Update impossible if Foreign Key column is invisible="true"

Hi,

I have a problem I do not understand.

I have a GridView that show one of my table, and this table has a column which is a foreign key...

I'd like this particular column in my GridView to be invisible to users, so they won't try to change its value when updatting the row.

The problem is : if I set the visible property of this column to "true", the update works. If I set it to "false", the update fails.

This column has also InsertVisible set to "False".

Does anyone has any idea of the reason why I have this issue?

Thanks in advance.
 

0
Strato
3/25/2007 5:18:44 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

23 Replies
480 Views

Similar Articles

[PageSpeed] 4

http://forums.asp.net/thread/1547081.aspx
Regards Mike
[MVP - ASP/ASP.NET]
My site
0
Mikesdotnetting
3/25/2007 6:05:13 PM

Mikesdotnetting:

Sorry but it didn't helped...

0
Strato
3/25/2007 6:21:19 PM
Could you show your code? Where is your primary key of the table?  You can put this "foreign key" into your gridview's DataKeyNames without using the invisible column.
Limno

0
limno
3/25/2007 6:38:13 PM
 Notice the ControlParameter...
    <asp:SqlDataSource ID="SqlDataSourceNewsletters" runat="server" ConnectionString="<%$ ConnectionStrings:InterfaceAdministrationConnexion %>"
        SelectCommand="SELECT * FROM [Newsletters] WHERE ([CodeAbonnement] = @CodeAbonnement)"
        ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Newsletters] WHERE [NumNews] = @original_NumNews AND [IntituleNews] = @original_IntituleNews AND [FichierHTML] = @original_FichierHTML AND [DateEnvoi] = @original_DateEnvoi AND [CodeAbonnement] = @original_CodeAbonnement"
        InsertCommand="INSERT INTO [Newsletters] ([IntituleNews], [FichierHTML], [DateEnvoi], [CodeAbonnement]) VALUES (@IntituleNews, @FichierHTML, @DateEnvoi, @CodeAbonnement)"
        OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Newsletters] SET [IntituleNews] = @IntituleNews, [FichierHTML] = @FichierHTML, [DateEnvoi] = @DateEnvoi, [CodeAbonnement] = @CodeAbonnement WHERE [NumNews] = @original_NumNews AND [IntituleNews] = @original_IntituleNews AND [FichierHTML] = @original_FichierHTML AND [DateEnvoi] = @original_DateEnvoi AND [CodeAbonnement] = @original_CodeAbonnement">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBoxAbonnements" Name="CodeAbonnement" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="original_NumNews" Type="Int32" />
            <asp:Parameter Name="original_IntituleNews" Type="String" />
            <asp:Parameter Name="original_FichierHTML" Type="String" />
            <asp:Parameter Name="original_DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="original_CodeAbonnement" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="IntituleNews" Type="String" />
            <asp:Parameter Name="FichierHTML" Type="String" />
            <asp:Parameter Name="DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="CodeAbonnement" Type="Int32" />
            <asp:Parameter Name="original_NumNews" Type="Int32" />
            <asp:Parameter Name="original_IntituleNews" Type="String" />
            <asp:Parameter Name="original_FichierHTML" Type="String" />
            <asp:Parameter Name="original_DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="original_CodeAbonnement" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="IntituleNews" Type="String" />
            <asp:Parameter Name="FichierHTML" Type="String" />
            <asp:Parameter Name="DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="CodeAbonnement" Type="Int32" />
        </InsertParameters>
    </asp:SqlDataSource> 
 
    <asp:GridView ID="GridViewNewsletters" runat="server" DataSourceID="SqlDataSourceNewsletters"
        PageSize="25" GridLines="None" ForeColor="#333333" Font-Size="Small" DataKeyNames="NumNews"
        CssClass="centré" CellPadding="2" AutoGenerateColumns="False" AllowPaging="True">
        <FooterStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True"></FooterStyle>
        <Columns>
            <asp:BoundField ReadOnly="True" DataField="NumNews" InsertVisible="False" Visible="False"
                SortExpression="NumNews" HeaderText="NumNews"></asp:BoundField>
            <asp:TemplateField SortExpression="IntituleNews" HeaderText="Intitulé">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxIntituleEdit" runat="server" Text='<%# Bind("IntituleNews") %>'
                        MaxLength="1000" Width="420"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorIntituleEdit" runat="server"
                        ErrorMessage="Vous devez saisir un intitulé." ControlToValidate="TextBoxIntituleEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("IntituleNews") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="FichierHTML" HeaderText="Fichier HTML">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxFichierHTMLEdit" runat="server" Text='<%# Bind("FichierHTML") %>'
                        MaxLength="200" Width="220"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorFichierHTMLEdit" runat="server"
                        ErrorMessage="Vous devez préciser un fichier HTML." ControlToValidate="TextBoxFichierHTMLEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorFichierHTML" runat="server"
                        ErrorMessage="Ce nom de fichier ne respecte pas le format attendu." ControlToValidate="TextBoxFichierHTMLEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic" ValidationExpression="^.+\.htm$"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("FichierHTML") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="DateEnvoi" HeaderText="Date d'envoi">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxDateEnvoiEdit" runat="server" Text='<%# Bind("DateEnvoi") %>'
                        MaxLength="19" Width="140"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorDateEnvoiEdit" runat="server"
                        ErrorMessage="Vous devez préciser une date d'envoi." ControlToValidate="TextBoxDateEnvoiEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorDateEnvoiEdit" runat="server"
                        ErrorMessage="Cette date d'envoi ne respecte pas le format attendu (XX/XX/XXXX 00:00:00)."
                        ControlToValidate="TextBoxDateEnvoiEdit" ValidationGroup="GroupEdit" Display="Dynamic"
                        ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("DateEnvoi") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CodeAbonnement" InsertVisible="False" SortExpression="CodeAbonnement"
                HeaderText="Abonnement"></asp:BoundField>
            <asp:TemplateField ShowHeader="False">
                <EditItemTemplate>
                    <asp:ImageButton ID="ImageButtonUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        ImageUrl="~/thumb_up.png" ValidationGroup="GroupEdit" />
                    <asp:ImageButton ID="ImageButtonCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        ImageUrl="~/thumb_down.png" />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButtonEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        ImageUrl="~/recycler.gif" />
                    <asp:ImageButton ID="ImageButtonDelete" runat="server" CausesValidation="False" CommandName="Delete"
                        ImageUrl="~/annuler.gif" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <RowStyle BackColor="#E3EAEB"></RowStyle>
        <EditRowStyle BackColor="#7C6F57"></EditRowStyle>
        <SelectedRowStyle BackColor="#C5BBAF" ForeColor="#333333" Font-Bold="True"></SelectedRowStyle>
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
        <HeaderStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True"></HeaderStyle>
        <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>
    </asp:GridView>
 
0
Strato
3/25/2007 6:49:24 PM

OK I got it...

You were right : I needed to put the foreign key (CodeAbonnement) in DataKeyNames...

... AND, change a little bit the UpdateCommand :

UpdateCommand="UPDATE [Newsletters] SET [IntituleNews] = @IntituleNews, [FichierHTML] = @FichierHTML, [DateEnvoi] = @DateEnvoi WHERE [NumNews] = @original_NumNews AND [IntituleNews] = @original_IntituleNews AND [FichierHTML] = @original_FichierHTML AND [DateEnvoi] = @original_DateEnvoi AND [CodeAbonnement] = @original_CodeAbonnement"
By removing this piece : SET [CodeAbonnement] = @CodeAbonnement (because of course I will never have to update CodeAbonnement, but VS 2005 created the Command automatically and didn't know that).
Thanks for your help. 
0
Strato
3/25/2007 7:03:30 PM

You are welcome.


Limno

0
limno
3/25/2007 7:26:09 PM

I have a new and slightly different problem.

To allow the user to insert new rows in the GridView, I have put a DetailsView which is linked to the same SqlDataSource than my GridView.

The problem is : this time I HAVE to precise the column CodeAbonnement in my InsertCommand.

Over both the DetailsView and the GridView there's a DropDownList. The user is supposed to choose an "abonnement" (it means "subscription"), so the GridView will appear, showing the newsletters refering to this subscription. In the same I need the CodeAbonnement InsertItemTemplate in my DetailsView to be filled with the DropDownList.SelectedValue. I'm trying but it keeps telling me that the CodeAbonnement value is NULL and that it's not allowed.

Here is the particular portion of code for the InserItemTemplate (ListBoxAbonnements.SelectedValue doesn't work) :

 

            <asp:TemplateField HeaderText="Abonnement" SortExpression="CodeAbonnement">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxAbonnementInsert" runat="server" Text='<%# ListBoxAbonnements.SelectedValue %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>

And here is the complete code of the DetailsView (the code of the GridView and the SqlDataSource is just over in this thread) :

 

    <asp:DetailsView ID="DetailsViewNewsletters" runat="server" Height="50px" Width="320px"
        AutoGenerateRows="False" CellPadding="4" Font-Size="Small" DataKeyNames="NumNews,CodeAbonnement"
        DataSourceID="SqlDataSourceNewsletters" ForeColor="#333333" GridLines="None"
        DefaultMode="Insert" CssClass="centré">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
        <EditRowStyle BackColor="#999999" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <Fields>
            <asp:BoundField DataField="NumNews" HeaderText="NumNews" InsertVisible="False" ReadOnly="True"
                SortExpression="NumNews" Visible="False" />
            <asp:TemplateField HeaderText="Intitulé" SortExpression="IntituleNews">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxIntituleInsert" runat="server" Text='<%# Bind("IntituleNews") %>'
                        MaxLength="1000" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorIntituleInsert" runat="server"
                        ErrorMessage="Vous devez saisir un intitulé." ControlToValidate="TextBoxIntituleInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Fichier HTML" SortExpression="FichierHTML">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxFichierHTMLInsert" runat="server" Text='<%# Bind("FichierHTML") %>'
                        MaxLength="200" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorFichierHTMLInsert" runat="server"
                        ErrorMessage="Vous devez préciser un fichier HTML." ControlToValidate="TextBoxFichierHTMLInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorFichierHTMLInsert"
                        runat="server" ErrorMessage="Ce nom de fichier ne respecte pas le format attendu."
                        ControlToValidate="TextBoxFichierHTMLInsert" ValidationGroup="GroupInsert" Display="Dynamic"
                        ValidationExpression="^.+\.htm$"></asp:RegularExpressionValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Date d'envoi" SortExpression="DateEnvoi">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxDateEnvoiInsert" runat="server" Text='<%# Bind("DateEnvoi") %>'
                        MaxLength="19" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorDateEnvoiInsert" runat="server"
                        ErrorMessage="Vous devez préciser une date d'envoi." ControlToValidate="TextBoxDateEnvoiInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorDateEnvoiInsert" runat="server"
                        ErrorMessage="Cette date d'envoi ne respecte pas le format attendu (XX/XX/XXXX 00:00:00)."
                        ControlToValidate="TextBoxDateEnvoiInsert" ValidationGroup="GroupInsert" Display="Dynamic"
                        ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$"></asp:RegularExpressionValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Abonnement" SortExpression="CodeAbonnement">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxAbonnementInsert" runat="server" Text='<%# ListBoxAbonnements.SelectedValue %>'></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <InsertItemTemplate>
                    <asp:ImageButton ID="ImageButtonNewsletterInsert" runat="server" CausesValidation="True"
                        CommandName="Insert" ImageUrl="~/plus.gif" ImageAlign="Right" ValidationGroup="GroupInsert" />
                </InsertItemTemplate>
            </asp:TemplateField>
        </Fields>
        <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:DetailsView>
Thanks for your help...
0
Strato
3/26/2007 10:33:51 AM

Try this:

 <asp:TextBox ID="TextBoxAbonnementInsert" runat="server" Text='<%# Bind("CodeAbonnement")%>'></asp:TextBox>


Limno

0
limno
3/26/2007 3:23:12 PM
limno:

Try this:

 <asp:TextBox ID="TextBoxAbonnementInsert" runat="server" Text='<%# Bind("CodeAbonnement")%>'></asp:TextBox>

I already tried and it keeps telling me that CodeAbonnement doesn't accept NULL value. 

0
Strato
3/26/2007 3:30:29 PM
Do you have NULL value in this column of your database?  Show your DDL code. Thanks.
Limno

0
limno
3/26/2007 3:47:41 PM

limno:
Do you have NULL value in this column of your database?  Show your DDL code. Thanks.

No, there's no NULL value in the Database for CodeAbonnement. There can't be. It's a foreign key (and yes, it's in DataKeyNames).

What do you mean by "DDL code" ?

0
Strato
3/26/2007 5:54:58 PM
I mean your DropDownList. We almost get all your code posted here.
Limno

0
limno
3/26/2007 6:03:24 PM

Here it comes :

 

    <asp:SqlDataSource ID="SqlDataSourceAbonnements" runat="server" ConnectionString="<%$ ConnectionStrings:InterfaceAdministrationConnexion %>"
        SelectCommand="SELECT [CodeAbonnement], [LibelleAbonnement] FROM [Abonnements]">
    </asp:SqlDataSource>
    <div class="centré" style="width: 500px">
        <p style="font-weight: bold">
            Choisissez un abonnement :</p>
        <asp:ListBox ID="ListBoxAbonnements" runat="server" DataSourceID="SqlDataSourceAbonnements"
            DataTextField="LibelleAbonnement" DataValueField="CodeAbonnement" Width="500px"
            Rows="8" AutoPostBack="true"></asp:ListBox>
    </div>
  
0
Strato
3/26/2007 6:43:09 PM

Hello,

Here is a sample for what you want to do:

<asp:ListBox ID="StateDropDown" runat="server" DataSourceID="SqlDSState"
            DataTextField="state" DataValueField="state" Width="500px"
            Rows="8" AutoPostBack="true"></asp:ListBox>   
      
       <asp:SqlDataSource ID="SqlDSState" runat="server"  SelectCommand="SELECT DISTINCT [state] FROM [authors]" ConnectionString="<%$ ConnectionStrings:Pubs %>" />

     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Pubs %>"
            SelectCommand="SELECT [id], [au_lname], [state] FROM [authors] WHERE [state]=@state" 
          
            InsertCommand="INSERT INTO [authors] ([au_lname], [state]) VALUES (@au_lname, @state)" >
         
            <SelectParameters>
            <asp:ControlParameter ControlID="StateDropDown" Name="state" PropertyName="SelectedValue" />
            </SelectParameters>
                
            <InsertParameters>
            <asp:ControlParameter ControlID="DetailsView1$TextBoxState" Name="state" PropertyName="Text" />
            
            </InsertParameters>         
     
          </asp:SqlDataSource>
       
       
       
        <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False" 
            DataSourceID="SqlDataSource2" Height="50px" Width="125px"  DataKeyNames="id" DefaultMode="insert" 
            AutoGenerateEditButton="true" AutoGenerateInsertButton="true" >
             <Fields>
                 <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                     SortExpression="id" />
                 <asp:BoundField DataField="au_lname" HeaderText="au_lname" SortExpression="au_lname" />
                  <asp:templatefield headertext="State">
                    <itemtemplate>
                      <%#Eval("state")%>                        
                    </itemtemplate>
                    <EditItemTemplate><asp:CheckBox ID="ck1" runat="server" />
            State:<asp:DropDownList ID="StateDropDown" DataSourceID="SqlDSState" DataTextField="state" DataValueField="state" SelectedValue='<%# Bind("state") %>' runat="server"  /> <br />  
                  
                    </EditItemTemplate>
                    <insertitemtemplate>
                   State:
                            
<asp:TextBox ID="TextBoxState" runat="server"  OnDataBinding="TextBoxState_OnDataBinding"></asp:TextBox>

  </insertitemtemplate>
                  </asp:templatefield>
             
                
            </Fields>
        </asp:DetailsView>
        
        
        
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="id" DataSourceID="SqlDataSource2">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                    SortExpression="id" />
                <asp:BoundField DataField="au_lname" HeaderText="au_lname" SortExpression="au_lname" />
                <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
            </Columns>
        </asp:GridView>
    
    
  
Protected Sub TextBoxState_OnDataBinding(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim myTextbox As TextBox = CType(sender, TextBox)
        myTextbox.Text = StateDropDown.SelectedValue.ToString
End Sub
 
Limno

0
limno
3/26/2007 7:22:52 PM

Mmmh... I tried a couple of things with what your code inspired me, but no, nothing.

I'm starting to wonder... Could it be a ViewState problem? Am I not supposed to keep the SelectedValue from the ListBox (it's not a DropDownBox, sorry if I made a mistake when describing it) in the ViewState?

0
Strato
3/26/2007 8:09:06 PM

Oh... And worth : now it's telling me that the DateEnvoi I write manually in the TextBoxDateEnvoiInsert is not a correct DateTime (eg : 26/03/2007 02:00:00). Before I was at least able to make an insert by writing a CodeAbonnement manually. Now that's impossible because of the error message for DateEnvoi.

I think I should try to create the DetailsView from scratch... I probably did too many tests on it...

0
Strato
3/26/2007 8:17:57 PM

Hello,

I tried the code with both DropDowList and ListBox. I think the following code should work.

 <asp:TemplateField HeaderText="Abonnement" SortExpression="CodeAbonnement">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxAbonnementInsert" runat="server"  OnDataBinding="TextBoxAbonnementInsert_OnDataBinding"></asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>

 

 <SelectParameters>
            <asp:ControlParameter ControlID="StateDropDown" Name="state" PropertyName="SelectedValue" />
            </SelectParameters>
                
<InsertParameters>
            <asp:ControlParameter ControlID="DetailsViewNewsletters$TextBoxState" Name="state" PropertyName="Text" />            
</InsertParameters>         
     
 

 VB.NET:

Protected Sub TextBoxAbonnementInsert_OnDataBinding(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim myTextbox As TextBox = CType(sender, TextBox)
        myTextbox.Text = StateDropDown.SelectedValue.ToString
End Sub

 

C#:

 protected void TextBoxState_OnDataBinding(object sender, EventArgs e)
    {       
        TextBox myTextbox = (TextBox)sender;
        myTextbox.Text = StateDropDown.SelectedValue.ToString();

    }
 

Limno

0
limno
3/26/2007 8:21:22 PM

You can see the result with EXACTLY the code you proposed me here. We're intested in the "Newsletters" tab. You can play with the site as much as you want, that doesn't matter (that's a school project). You can't see the site when my computer is turned off (IIS), which means at french sleeping time Wink.

And here is my code has it is EXACTY in Visual Studio 2005 when I published the site :

 

<%@ Page Language="C#" MasterPageFile="~/InterfaceAdmnistrationMasterPage.master"
    AutoEventWireup="true" CodeFile="Newsletters.aspx.cs" Inherits="Newsletters"
    Title="Interface d'Administration - Newsletters" MaintainScrollPositionOnPostback="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
        document.getElementById('linewsletters').className = 'active';
    </script>

    <asp:SqlDataSource ID="SqlDataSourceAbonnements" runat="server" ConnectionString="<%$ ConnectionStrings:InterfaceAdministrationConnexion %>"
        SelectCommand="SELECT [CodeAbonnement], [LibelleAbonnement] FROM [Abonnements]">
    </asp:SqlDataSource>
    <div class="centré" style="width: 500px">
        <p style="font-weight: bold">
            Choisissez un abonnement :</p>
        <asp:ListBox ID="ListBoxAbonnements" runat="server" DataSourceID="SqlDataSourceAbonnements"
            DataTextField="LibelleAbonnement" DataValueField="CodeAbonnement" Width="500px"
            Rows="8" AutoPostBack="true"></asp:ListBox>
    </div>
    <table class="legende">
        <tr>
            <td>
                <img id="ModifierImg" src="recycler.gif" alt="Modifier la ligne" /></td>
            <td class="middle">
                <img id="SupprimerImg" src="annuler.gif" alt="Supprimer la ligne" /></td>
            <td>
                <img id="InsérerImg" src="plus.gif" alt="Ajouter une ligne" /></td>
        </tr>
        <tr>
            <td>
                Modifier une newsletter</td>
            <td class="middle">
                Supprimer une newsletter</td>
            <td>
                Ajouter une newsletter</td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSourceNewsletters" runat="server" ConnectionString="<%$ ConnectionStrings:InterfaceAdministrationConnexion %>"
        SelectCommand="SELECT * FROM [Newsletters] WHERE ([CodeAbonnement] = @CodeAbonnement)"
        ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Newsletters] WHERE [NumNews] = @original_NumNews AND [IntituleNews] = @original_IntituleNews AND [FichierHTML] = @original_FichierHTML AND [DateEnvoi] = @original_DateEnvoi AND [CodeAbonnement] = @original_CodeAbonnement"
        InsertCommand="INSERT INTO [Newsletters] ([IntituleNews], [FichierHTML], [DateEnvoi], [CodeAbonnement]) VALUES (@IntituleNews, @FichierHTML, @DateEnvoi, @CodeAbonnement)"
        OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Newsletters] SET [IntituleNews] = @IntituleNews, [FichierHTML] = @FichierHTML, [DateEnvoi] = @DateEnvoi WHERE [NumNews] = @original_NumNews AND [IntituleNews] = @original_IntituleNews AND [FichierHTML] = @original_FichierHTML AND [DateEnvoi] = @original_DateEnvoi AND [CodeAbonnement] = @original_CodeAbonnement">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBoxAbonnements" Name="CodeAbonnement" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="original_NumNews" Type="Int32" />
            <asp:Parameter Name="original_IntituleNews" Type="String" />
            <asp:Parameter Name="original_FichierHTML" Type="String" />
            <asp:Parameter Name="original_DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="original_CodeAbonnement" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="IntituleNews" Type="String" />
            <asp:Parameter Name="FichierHTML" Type="String" />
            <asp:Parameter Name="DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="original_NumNews" Type="Int32" />
            <asp:Parameter Name="original_IntituleNews" Type="String" />
            <asp:Parameter Name="original_FichierHTML" Type="String" />
            <asp:Parameter Name="original_DateEnvoi" Type="DateTime" />
            <asp:Parameter Name="original_CodeAbonnement" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="IntituleNews" Type="String" />
            <asp:Parameter Name="FichierHTML" Type="String" />
            <asp:Parameter Name="DateEnvoi" Type="DateTime" />
            <asp:ControlParameter ControlID="DetailsViewNewsletters$TextBoxAbonnementInsert" Name="CodeAbonnement" PropertyName="Text" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:DetailsView ID="DetailsViewNewsletters" runat="server" Height="50px" Width="320px"
        AutoGenerateRows="False" CellPadding="4" Font-Size="Small" DataKeyNames="NumNews,CodeAbonnement"
        DataSourceID="SqlDataSourceNewsletters" ForeColor="#333333" GridLines="None"
        DefaultMode="Insert" CssClass="centré">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
        <EditRowStyle BackColor="#999999" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <Fields>
            <asp:BoundField DataField="NumNews" HeaderText="NumNews" InsertVisible="False" ReadOnly="True"
                SortExpression="NumNews" Visible="False" />
            <asp:TemplateField HeaderText="Intitulé" SortExpression="IntituleNews">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxIntituleInsert" runat="server" Text='<%# Bind("IntituleNews") %>'
                        MaxLength="1000" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorIntituleInsert" runat="server"
                        ErrorMessage="Vous devez saisir un intitulé." ControlToValidate="TextBoxIntituleInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Fichier HTML" SortExpression="FichierHTML">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxFichierHTMLInsert" runat="server" Text='<%# Bind("FichierHTML") %>'
                        MaxLength="200" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorFichierHTMLInsert" runat="server"
                        ErrorMessage="Vous devez préciser un fichier HTML." ControlToValidate="TextBoxFichierHTMLInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorFichierHTMLInsert"
                        runat="server" ErrorMessage="Ce nom de fichier ne respecte pas le format attendu."
                        ControlToValidate="TextBoxFichierHTMLInsert" ValidationGroup="GroupInsert" Display="Dynamic"
                        ValidationExpression="^.+\.htm$"></asp:RegularExpressionValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Date d'envoi" SortExpression="DateEnvoi">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxDateEnvoiInsert" runat="server" Text='<%# Bind("DateEnvoi") %>'
                        MaxLength="19" Width="180"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorDateEnvoiInsert" runat="server"
                        ErrorMessage="Vous devez préciser une date d'envoi." ControlToValidate="TextBoxDateEnvoiInsert"
                        ValidationGroup="GroupInsert" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorDateEnvoiInsert" runat="server"
                        ErrorMessage="Cette date d'envoi ne respecte pas le format attendu (XX/XX/XXXX 00:00:00)."
                        ControlToValidate="TextBoxDateEnvoiInsert" ValidationGroup="GroupInsert" Display="Dynamic"
                        ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$"></asp:RegularExpressionValidator>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Abonnement" SortExpression="CodeAbonnement">
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBoxAbonnementInsert" runat="server" OnDataBinding="TextBoxAbonnementInsert_OnDataBinding">
                    </asp:TextBox>
                </InsertItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <InsertItemTemplate>
                    <asp:ImageButton ID="ImageButtonNewsletterInsert" runat="server" CausesValidation="True"
                        CommandName="Insert" ImageUrl="~/plus.gif" ImageAlign="Right" ValidationGroup="GroupInsert" />
                </InsertItemTemplate>
            </asp:TemplateField>
        </Fields>
        <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:DetailsView>
    <asp:UpdatePanel ID="UpdatePanelNewsletters" runat="server">
        <contenttemplate>
    <asp:GridView ID="GridViewNewsletters" runat="server" DataSourceID="SqlDataSourceNewsletters"
        PageSize="25" GridLines="None" ForeColor="#333333" Font-Size="Small" DataKeyNames="NumNews, CodeAbonnement"
        CssClass="centré" CellPadding="2" AutoGenerateColumns="False" AllowPaging="True">
        <FooterStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True"></FooterStyle>
        <Columns>
            <asp:BoundField ReadOnly="True" DataField="NumNews" InsertVisible="False" Visible="False"
                SortExpression="NumNews" HeaderText="NumNews"></asp:BoundField>
            <asp:TemplateField SortExpression="IntituleNews" HeaderText="Intitulé">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxIntituleEdit" runat="server" Text='<%# Bind("IntituleNews") %>'
                        MaxLength="1000" Width="420"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorIntituleEdit" runat="server"
                        ErrorMessage="Vous devez saisir un intitulé." ControlToValidate="TextBoxIntituleEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("IntituleNews") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="FichierHTML" HeaderText="Fichier HTML">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxFichierHTMLEdit" runat="server" Text='<%# Bind("FichierHTML") %>'
                        MaxLength="200" Width="220"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorFichierHTMLEdit" runat="server"
                        ErrorMessage="Vous devez préciser un fichier HTML." ControlToValidate="TextBoxFichierHTMLEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorFichierHTMLEdit" runat="server"
                        ErrorMessage="Ce nom de fichier ne respecte pas le format attendu." ControlToValidate="TextBoxFichierHTMLEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic" ValidationExpression="^.+\.htm$"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("FichierHTML") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="DateEnvoi" HeaderText="Date d'envoi">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBoxDateEnvoiEdit" runat="server" Text='<%# Bind("DateEnvoi") %>'
                        MaxLength="19" Width="140"></asp:TextBox><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorDateEnvoiEdit" runat="server"
                        ErrorMessage="Vous devez préciser une date d'envoi." ControlToValidate="TextBoxDateEnvoiEdit"
                        ValidationGroup="GroupEdit" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorDateEnvoiEdit" runat="server"
                        ErrorMessage="Cette date d'envoi ne respecte pas le format attendu (XX/XX/XXXX 00:00:00)."
                        ControlToValidate="TextBoxDateEnvoiEdit" ValidationGroup="GroupEdit" Display="Dynamic"
                        ValidationExpression="^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s([0-1]\d|[2][0-3])\:[0-5]\d\:[0-5]\d)$"></asp:RegularExpressionValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("DateEnvoi") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CodeAbonnement" InsertVisible="False" SortExpression="CodeAbonnement"
                HeaderText="Abonnement" Visible="False"></asp:BoundField>
            <asp:TemplateField ShowHeader="False">
                <EditItemTemplate>
                    <asp:ImageButton ID="ImageButtonUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        ImageUrl="~/thumb_up.png" ValidationGroup="GroupEdit" />
                    <asp:ImageButton ID="ImageButtonCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        ImageUrl="~/thumb_down.png" />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButtonEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        ImageUrl="~/recycler.gif" />
                    <asp:ImageButton ID="ImageButtonDelete" runat="server" CausesValidation="False" CommandName="Delete"
                        ImageUrl="~/annuler.gif" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <RowStyle BackColor="#E3EAEB"></RowStyle>
        <EditRowStyle BackColor="#7C6F57"></EditRowStyle>
        <SelectedRowStyle BackColor="#C5BBAF" ForeColor="#333333" Font-Bold="True"></SelectedRowStyle>
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
        <HeaderStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True"></HeaderStyle>
        <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>
    </asp:GridView>
    </contenttemplate>
        <triggers>
            <asp:AsyncPostBackTrigger ControlID="ListBoxAbonnements" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="DetailsViewNewsletters" EventName="ItemInserted" />
        </triggers>
    </asp:UpdatePanel>
</asp:Content>
 
  
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Newsletters : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void TextBoxAbonnementInsert_OnDataBinding(object sender, EventArgs e)
    {
        TextBox TempTextBox = (TextBox)sender;
        TempTextBox.Text = ListBoxAbonnements.SelectedValue.ToString();
    }
}

 

I can't do better...

Thanks for your patience. 

0
Strato
3/26/2007 8:42:49 PM

 When you put controls inside other container, you need to figure out a way to access it.

I am really hacking this thing out. Please change this line:

 <asp:ControlParameter ControlID="ContentPlaceHolder1$DetailsViewNewsletters$TextBoxAbonnementInsert" Name="CodeAbonnement" PropertyName="Text" />


Limno

0
limno
3/26/2007 8:59:34 PM

No. No change.

But I fixed my IIS : http://81.57.43.204/

0
Strato
3/26/2007 9:13:20 PM

What do you mean no change? I cannot see your error message.

I am trying to hacking this value for the InsertParameter from the page. Of cource, we can access this value directly from code behind.

I wraped my sample into a Master page and change the code like what I showed before. It works.

 If this does not work for your insert, you should be able to find the name/id of this Textbox if see the html source and let me know that.


Limno

0
limno
3/26/2007 9:22:11 PM

I have to go to bed.Stick out tongue

I think I did too much changes on this webpage, so tomorrow I'll try to start it from scratch, and do it all over again, step by step.

I'll tell you if it works better...

0
Strato
3/26/2007 9:41:00 PM

Hi,

I finally managed to have some time to start the whole webpage from scratch, and... now it works. Thanks again.

0
Strato
4/9/2007 7:05:48 PM
Reply:

Similar Artilces:

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Attempt to over-write foreign key column "Code" where table A has 3 foreign keys to table X
Generating from CDM to Logical. PD 9.5.2.889 This is a weird one - 4 tables in my model have more than one foreign key reference to table COROrg. By default a foreign ket to COROrg generates as COROrgKy. I have renamed the other foreign keys appropriately - e.g. COROrgKyEmpGrp. After the rename when I generate from CDM to Logical everything's fine for all but on of the foreign key columns (i.e. the new name/code are maintained in all but one). The list of changes to happen (obtained from Merge dialog -> Merge Preview) says it's going to 'Modify Column "...

updateable columns
is this correct? I think not! Greetings Frank Using PowerBuilder 11.2 Build 8616 Hi Frank; This feature is working great for me (PB 11.2 build 8407). 1) What DBMS are you using? 2) What DB connectivity mechanism are you using? -- Regards ... Chris ISUG - NA RUG Director http://chrispollach.pbdjmagazine.com "Frank Steinmann" <Frank.Steinmann@cs-edv.de> wrote in message news:4926801f$1@forums-1-dub... > is this correct? > > I think not! > > Greetings Frank > Using PowerBuilder 11.2 Build 8616 > Also, what a...

"Before Update" and "After Update Of" triggers
Hi all, In a row-level before update trigger I set the value of a column ("SomeColumn) to some value (the value is only changed by this trigger, not by the update statement itself) Now I notice that the row-level trigger defined as "after update of SomeColumn" doesn't fire when I change the value of this column in the before update trigger. It does fire (as expected) when the change comes from the update statement itself) Questions: - Is this expected behaviour? - how can I uniformly trigger a change of a column wether set by the update statement or by...

"auto-reuse columns" with foreign key columns gives auto-renamed duplicate table columns
PD: 12.5.0.2337 EDF17 DBMS: MSSQLSRV2005 We have composite keys on our tables to enforce relationships between records referenced from the same instance. For example, we have a Companies table with pk COMPANYID and a ContactPersons table with pk COMPANYID, CONTACTPERSONID. Orders can be created referencing a mandatory company, plus an optional contact person which has to be a contact person of that company. We model this by creating 2 fields in the Orders table: COMPANYID and CONTACTPERSONID plus 2 foreign keys into the Companies and ContactPersons tables. i.e. both foreign keys sh...

Are there different between ViewState.Add("key","Word"); and ViewState["key"] = "Word";
I think the 1 and 2 are complete same, is it correct? 1. ViewState.Add("key","Word"); 2. ViewState["key"] = "Word";SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator You are correct, option 2 is short hand for option 1.Philip Beadle (MVP, MCAD, MCT DotNetNuke Core Team)...

Link the "Referenced By" and "Foreign Key" folders in SC
This drives me nuts. When I need to see all the tables that reference a given "parent" table, the "Referenced By" folder is a life-saver. However, the next thing I *always* want to see is the details of the foreign key definition. "Jeez, is that a Cascade Delete or a Restrict? I can't remember".. I've got to navigate to the Foreign Keys folder of the referencing table to see that detail. With hundreds of tables in our model, this is really getting nasty. Either let me see the foreign key details (columns and integrity, and view-only would ...

FormView Control, and "Click" event of "Update" button
Hi Folks,I have a question relating to attaching code to the "Click" event of the default "Update" button within the EditTemplate of the FormView control.Without coding the "Click" event, the database update of the modified record works fine.However, as soon as I add some code to the event, as follows:protected void UpdateButton_Click(object sender, EventArgs e){Response.Redirect("Default.aspx");}... the database update is not done.Do I need to do some manual coding to do the update via the ObjectDataSource in this case?If so, can anyone advise what? ...

No "Update" or "Delete"!
Hi,I am using the dataset wizard to connect to a SQL database. The wizard creates my dataset and generates  "Select" and "Insert" statements but no "Update" or "delete". What can be the reason? By the way, this happens only on certain tables and not on others. I just can't figure out what the difference between these tables is. And, they all have a primary key. Actually I found this error before, running the configuration for the table again gives me that, sometimes I had to delete the table and start again. Hope this helps, let me...

<key id="key_savePage" key="&savePageCmd.command.key;" command-"Broswer:SavePage" modifiers="accel"/> ----^
Name: yel0sub Email: yel0subatcomcastdotnet Product: SeaMonkey Summary: <key id="key_savePage" key="&savePageCmd.command.key;" command-"Broswer:SavePage" modifiers="accel"/> ----^ Comments: Downloaded SeaMonkey 1.1.5 with same result on installation. PowerBook G4 OS X 10.4.10 Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 ...

Problems with "Key and Updateable Columns" option
Hello all! My department is using PB 6.0 and PFC on an Informix 7 database. We're attempting to use the Update Properties of our datawindows to prevent update of data that has already been changed by another user. I assume this is a common practice. For example, two people bring up the same record for edit. User 1 makes changes and saves - his update is successful. User 2 brings up the same record before User 1 saves, so he doesn't know that data in this record has already been changed. When User 2 attempts to save, his update should fail or at least give us some indicat...

superreview granted: [Bug 274440] ".key" should not be used to describe access keys, use ".accesskey" instead : [Attachment 174088] updated patch
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Hasse <jasajudeju@telia.com>'s request for superreview: Bug 274440: ".key" should not be used to describe access keys, use ".accesskey" instead https://bugzilla.mozilla.org/show_bug.cgi?id=274440 Attachment 174088: updated patch https://bugzilla.mozilla.org/attachment.cgi?id=174088&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> Transferring r=db48x as per his comment. ...

superreview requested: [Bug 274440] ".key" should not be used to describe access keys, use ".accesskey" instead : [Attachment 174088] updated patch
Hasse <jasajudeju@telia.com> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> for superreview: Bug 274440: ".key" should not be used to describe access keys, use ".accesskey" instead https://bugzilla.mozilla.org/show_bug.cgi?id=274440 Attachment 174088: updated patch https://bugzilla.mozilla.org/attachment.cgi?id=174088&action=edit ------- Additional Comments from Hasse <jasajudeju@telia.com> Don't remove the "<key key=" lines. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

Web resources about - Update impossible if Foreign Key column is invisible="true" - asp.net.presentation-controls

Resources last updated: 12/28/2015 3:05:51 PM