This is a migrated thread and some comments may be shown as answers.

Programmatically setting column values

1 Answer 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Corey
Top achievements
Rank 1
Corey asked on 26 May 2015, 02:24 PM

Hello,

I am currently working on a behavior that enables bulk editing functionality for the gridview.  I have a working prototype that hooks into the CellEditEnded event.  It seems to be a little bit hacky though, involving getting the binding path (args.Cell.DataColumn.DataMemberBinding.Path.Path), separating that out into one (or more) PropertyInfo element, then walking that dependency chain back and calling the final propertyInfo.SetValue(rowItem, newData) for each edited item.

I looked at other alternatives to this and found that the GridViewCell has a Value property.  Instead of going the reflection route, I tried to iterate down the rows / cells and set the value using the GridViewCell.Value property.  This does not propigate back to the bound object though or update the visual state.

Is there a way to programmatically set cell values without going the reflection route and having to reconstruct the binding?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 28 May 2015, 04:03 PM
Hello Corey,

RadGridView supports only one cell to be in edit mode, so such approach is not supported.

You can check our documentation on Managing Data for further reference.

Best Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Corey
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or