Edit value that is passed on from CellEditEnded if data passed in is empty

2 posts, 0 answers
  1. Marcus
    Marcus avatar
    5 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    Hey there!

    Im trying to change the value of a  field if the content of it is null/white spaces. Im using the CellEditEnded event.

    I've tried with my gridview's name.CurrentCell.Value="#" also tried with e.Cell.Value="#"

    With no luck. Any idea? Should be fairly simple, but I can't figure it out.

    Here's my code.
    private void EditingRowsGrid_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
              if (string.IsNullOrWhiteSpace(e.NewData.ToString()))
                  // Insert content here to set the value to "#"
  2. Vlad
    Vlad avatar
    11100 posts

    Posted 10 Aug 2012 Link to this post


     Why not handle this directly in the data item property setter? 

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top