I have a webdatagrid that I am binding a datasource to..
I have crud enabled...
When I change text in a cell then leave the cell/row. and click on a update button on the page, I look at the dataset and the rows are getting updated with new values.
Here is the source.
<ig:WebDataGrid ID="wdgSWStatusCode" runat="server" AutoGenerateColumns="False" EnableTheming="False" Height="75%" StyleSetName="Default" Width="98%" Font-Names="lucinda sans" DataKeyFields="SWSTATUS" EnableDataViewState="True" ViewStateMode="Enabled" > <Columns> <ig:BoundDataField DataFieldName="SWSTATUS" Key="SWSTATUS" Width="150px" DataType="System.String"> <Header Text="Status Code" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Definition" Key="Definition" Width="400px" DataType="System.String" EnableMultiline="True"> <Header Text="Definition" /> </ig:BoundDataField> <ig:BoundCheckBoxField DataFieldName="SHOWBEFOREBAFO" DataType="System.Int32" Key="SHOWBEFOREBAFO" Width="100px"> <Header Text="Use in All Rounds" /> </ig:BoundCheckBoxField> <ig:BoundCheckBoxField DataFieldName="MOVESTONEXTROUND" DataType="System.Boolean" Key="MOVESTONEXTROUND" Width="100px"> <Header Text="Advance to Subsequent Rounds" /> </ig:BoundCheckBoxField> </Columns> <Behaviors> <ig:EditingCore> <Behaviors> <ig:CellEditing Enabled="true"> <ColumnSettings> </ColumnSettings> </ig:CellEditing> <ig:RowAdding> </ig:RowAdding> <ig:RowDeleting /> </Behaviors> </ig:EditingCore> <ig:Selection RowSelectType="Single" ColumnSelectType="Single"> </ig:Selection> <ig:ColumnResizing> </ig:ColumnResizing> <ig:RowSelectors RowNumbering="True"> </ig:RowSelectors> </Behaviors> <Templates> </Templates> </ig:WebDataGrid>The data is bound on initial page load and dataviewstate is on.Any ideas on what I'm doing wrong?
Hello Daryl007,
I saw your markup and I made a sample based on it the sample is updated as expected. The sample needs Nwind.mdb in App_Data folder. As you are not using batch updating I have to ask are you commiting the grid on this button press. I could not understand what exactly is your issue – the rows are not updating in your datasource? The webdatagrid shows the old values after the button is pressed?
Sorry,
I found out from the list of AutoCRUD-able dataset that my IList does not work with autocrud.
So now I am wrestling with manual updates, adds, deletes...
It would great if you guys could put out a sample that handles add, update, delete on the server side. Every sample does part of something but not all.
we really need a sample that uses manual crud, and shows the code in the vb or cs page.
Hello Daryl,Here is a sample with manual AutoCrud. You have to keep the datasource in the session and then get the datasource, modify it and assign it again on the operations. Delete the row by key from the datasource, update the row again finding it by key and only when you insert the row you have to be carefull with setting the id. Also it is good to set the id column to be non editable.
thanks, I'll give it a go.
Hello Daryl,Just following up to check if you have any further questions regarding the issue.