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

RowEditEnded

2 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Louis Bouchard
Top achievements
Rank 1
Louis Bouchard asked on 04 Aug 2010, 11:10 PM
Someone know how to set a value to a specific field in the RadGridView?

I try this w/o any success!

private void RadGridView1_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
    e.Row.Cells[2].Content = "Hellooooooooooooooo";
}

In fact, when I edit this cell (index #2) and typing something like XXX when I exit Hellooooooooooooooo display.  But when I edit it again the old value display (XXX)!!!

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Aug 2010, 06:27 AM
Hi,

 It will be better to change desired property of the underling object directly. For example:

var customer = RadGridView1.Items.OfType<Customer>().Where(c=>c.City == "London").FirstOrDefault();
if(customer != null)
{
   customer.City = "Berlin";
}

If the underling object is INotifyPropertyChanged the grid will update itself immediately! 

All the best,
Vlad
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Louis Bouchard
Top achievements
Rank 1
answered on 05 Aug 2010, 05:22 PM
Thank you but I try this solution and it's seem more easy (thanks to the Visual Studio debugger) :

((BusinessApplicationTest.Web.MyEntiy)e.NewData).Localisation = "Hellooooooooooooooo";


Tags
GridView
Asked by
Louis Bouchard
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Louis Bouchard
Top achievements
Rank 1
Share this question
or