Programmatically setting column values

2 posts, 0 answers
  1. Corey
    Corey avatar
    1 posts
    Member since:
    Jan 2015

    Posted 26 May 2015 Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 28 May 2015 Link to this post

    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
Back to Top