I have an ultrwebgrid bound to a sqldatasource. The UpdateRow event fires when I add a row, along with the AddRow event, but it does not fire when I update a row. I think I have all the AllowUpdate type fields set. The adding of rows run fine. I have taken out the paging to simplify. I can edit the lone updateable cell just fine. I have a multiple field primary key, but it is supposed to handle it as I input the fields, in the correct order, separated by commas in the DataKeyFields property. I have attached the pertinent markup and C# code.
How are you binding your grid to the SqlDataSource?
If you're doing this in code, you may need to move this to a different location (Page_Load is the most often used and may be too late in the page's lifecycle), or possibly avoid calling DataBind().
If you're doing this in the designer, then I can't think of a reason why this should occur. Can you reproduce in a sample application that we can run and debug?
The grid is bound to the datasource via the ultrawebgrid property in the designer.
DataSourceID
="sqldsNote"
I only call UltraWebGrid.DataBind in two places. Once when I get the values for the table key I do the below along with the SqlDataSource. This is only firing once as is proper.
sqldsNote.SelectParameters[
"Identifier"].DefaultValue = tbVendID.Text;
sqldsNote.DataBind();
uwgNotes.DataBind();
The other was in the uwgNotes_PageIndexChanged event which no longer occurs as paging is removed.
The AddRow is updating the database and firing UpdateRow successfully so the grid must be connected to the sqldatasource with its InsertCommand and UpdateCommand.
I do not get any error, just no database update occurs and the UpdateRow event does not fire. I am using the latest version of Infragistics35 8.3.20083.2059.
robertloucksjr2 said: Once when I get the values for the table key I do the below along with the SqlDataSource. This is only firing once as is proper. sqldsNote.SelectParameters["Identifier"].DefaultValue = tbVendID.Text; sqldsNote.DataBind(); uwgNotes.DataBind();
Once when I get the values for the table key I do the below along with the SqlDataSource. This is only firing once as is proper.
sqldsNote.SelectParameters["Identifier"].DefaultValue = tbVendID.Text;
This occurs only once on not PostBack in PageLoad with the data being selected driven by a query string. The UtraGridView is getting the rows of data from the SqlDataSource SelectCommand which runs automatically via the sqldatasource when I do the sqldatasource.DataBind().