Hi,
Im an ASP newbie and a EO's very newbie. I'm trying to update my DB after editing my grid. I know that this is a two-step thing. I edit the grid then I should check the grid.AddedItems or grid.ChangedItems for the new and updated items.
I've been searching and reading all the afternoon and I couldn't find the answer. After a postback, bot collection has zero lenght. I couldn't find what I'm doing wrong. I paste my definitions here:
The grid definition:
Quote:<eo:Grid ID="MyGrid" runat="server" AllowNewItem="True" RunningMode="Client"
BorderColor="#C7D1DF" ColumnHeaderAscImage="00050303" ColumnHeaderDescImage="00050304"
ColumnHeaderDividerImage="00050302" Font-Bold="False" Font-Italic="False" Font-Names="Verdana"
Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False"
GridLineColor="199, 209, 223" GridLines="Both" Height="213px" ItemHeight="19"
Width="726px">
The columns:
Quote:
<Columns>
<eo:ButtonColumn Width="25" ButtonType="LinkButton" ButtonText="Go">
</eo:ButtonColumn>
<eo:TextBoxColumn Width="200" HeaderText="Name">
</eo:TextBoxColumn>
<eo:EditCommandColumn CancelText="X" EditText="Edit" UpdateText="V" Width="50">
</eo:EditCommandColumn>
</Columns>
The button (just in case):
Quote:<asp:Button ID="Button1" runat="server" Text="Button" />
The server event:
Quote: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Debug.Print("added: " & MyGrid.AddedItems.Length)
System.Diagnostics.Debug.Print("updated: " & MyGrid.ChangedItems.Length)
End Sub
The 2 values printed are always zero.
Of course, I can see the grid, I can edit elements (after clicking the "edit" button) and I can add new elements. The grid is binded with an object collection, I don't know if this is important.
Regards,