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

NewRowPosition in RadGridView

1 Answer 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
crazy05
Top achievements
Rank 1
crazy05 asked on 27 Apr 2015, 05:25 PM

I have NewRowposition at the top which is working fine.

 My Issue is when I click on that the Row ID# always shows '0'. I want it to show the next available ID on the Grid. How Can I do this ?

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 28 Apr 2015, 11:18 AM
Hi,

You can try subscribing for the AddingNewDataItem event of RadGridView and initialize the e.NewObject.
For example:
private void radGridView_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
{
    e.NewObject = new MessageViewModel("tom@hanna-barbera.com", "Cats are cool", 100);
}

Regards,
Dimitrina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
crazy05
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or