4 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 11 Mar 2011, 08:53 AM
Hello,
I hope the following forum link will give you some insight on this.
Select Item After Insert
Also give a try with the sample code provided by Telerik and see whether it help on this. Best of luck.
-Shinu.
I hope the following forum link will give you some insight on this.
Select Item After Insert
Also give a try with the sample code provided by Telerik and see whether it help on this. Best of luck.
-Shinu.
0
Hello Ronald,
Maya
the Telerik team
Does the solution in the suggested forum thread meets your requirements or you expect something different ?
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0

ronald
Top achievements
Rank 1
answered on 11 Mar 2011, 01:40 PM
No.. didn't answer my question at all..
I need to bind the grid using DataView so there will be no "Items_CollectionChanged" event. Also, I need to highlight rows for those new inserted records (just visually differentiate between the existing records and the new created records).
any further helps?
I need to bind the grid using DataView so there will be no "Items_CollectionChanged" event. Also, I need to highlight rows for those new inserted records (just visually differentiate between the existing records and the new created records).
any further helps?
0
Hello ronald,
In this case a row will be coloured after an item is added. However, once you sort for example, the colour will be lost.
If you want to save the background after sorting/ filtering, etc., you may expose a new property giving information about the item - whether is a new or old one. Afterwards, based on this property, you may colour the row during the RowLoaded event. Another possible approach will be to use a StyleSelector and again colour the row depending on the value of that particular property.
Best wishes,
Maya
the Telerik team
There are a couple of options here. Firstly, you may handle the RowEditEnded event like follows:
private void gridView_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
{
if (e.EditOperationType == GridViewEditOperationType.Insert)
{
(e.Row as GridViewRow).Background = new SolidColorBrush(Colors.Tomato);
}
}
In this case a row will be coloured after an item is added. However, once you sort for example, the colour will be lost.
If you want to save the background after sorting/ filtering, etc., you may expose a new property giving information about the item - whether is a new or old one. Afterwards, based on this property, you may colour the row during the RowLoaded event. Another possible approach will be to use a StyleSelector and again colour the row depending on the value of that particular property.
Best wishes,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!