hey.
i've created an heirarchical webgrid which holds two bands of data created at runtime
[nothing is defined at design, but the webgrid and it's visual appearance, colors, and such, rows and columns are not defined]
a dataset is created at runtime during page load event with sqldataadapter.
when i click on child row a new modal window appears with a custom form to update the data of the selected row, the reason i'm using a custom form is since i'm updating data which doesn't exist in the original grid, since the child node only contains 3 out of all the collumns available on the table in the sql server.
the custom form is made of a formview and sqldatasource, when i finish inserting the data, i press an update button and the window is closed while the orginal window [with the grid] get a postback.
now here is the kicker, after i select the same row again i get the old values before the update, this happnes until i close the window and reopen the page, only then, i get the updated data.
do you have any idea why such a thing might happen ?
You might need to rebind the grid after you process the custom form.
tried it,
also tried completly recreateing the dataset from scratch in code, still nothing...
If you post your code, I'll look at it. (I don't promise I'll be able to fix it, but without the code, I'm out of guesses.)
SqlConnection conn = new SqlConnection("Data Source=*****,****;Initial Catalog=*******;Persist Security Info=True;User ID=****;Password=$****"); SqlDataAdapter Prime = new SqlDataAdapter("some select command",conn); ds = new DataSet(); Prime.FillLoadOption = LoadOption.PreserveChanges; Prime.Fill(ds, "Prime"); String SelectCommand = "some select command"; SqlDataAdapter child = new SqlDataAdapter(SelectCommand, conn); child.FillLoadOption = LoadOption.PreserveChanges; child.Fill(ds, "Secondary"); ds.Relations.Add("Secondary", ds.Tables["Prime"].Columns["Network"], ds.Tables["Secondary"].Columns["Network"]); UltraWebGrid1.DataSource = ds.Tables["Prime"].DefaultView; }
here is the code...
hopefully this will help figure out the problem...
i'm calling datagrid.databind() after that function, so basicly there is no difference.
anyways, what i did is to load the entire table into the grid instead of just part of it and do a batch update right from the grid instead of from a custom menu.
I'm doing something quite similar, here:
http://forums.infragistics.com/forums/p/3298/17902.aspx#17902
I see the following differences: