I have a simple generic list
which I bind to a grid. I let the grid generate the columns. On the PreRender, I set everything to edit
And my grid appears with my data in it, although annoyingly, the last row is selected.
If I change a value in the Grid, how do I get the updated value back at the server? If I access the grid items DataItem, it is always null. I was expecting the DataItem to be a regenerated version of the object I originally did the bind with. I've been following threads around but I still cannot get this simple scenario to work. The MVC demo web site has a new feature 'Keyboard Navigation' which shows the kind of behavior I want.
Anyone got a working sample?
List<WrapperViewModel> viewModels = new List<WrapperViewModel>();viewModels.Add(new WrapperViewModel("Paul", 45));viewModels.Add(new WrapperViewModel("Hannah", 36));viewModels.Add(new WrapperViewModel("Joshua", 22));viewModels.Add(new WrapperViewModel("Tissie", 6));which I bind to a grid. I let the grid generate the columns. On the PreRender, I set everything to edit
foreach (GridDataItem item in RadGrid1.Items){ item.Edit = true;}And my grid appears with my data in it, although annoyingly, the last row is selected.
If I change a value in the Grid, how do I get the updated value back at the server? If I access the grid items DataItem, it is always null. I was expecting the DataItem to be a regenerated version of the object I originally did the bind with. I've been following threads around but I still cannot get this simple scenario to work. The MVC demo web site has a new feature 'Keyboard Navigation' which shows the kind of behavior I want.
Anyone got a working sample?