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

Add, remove events

1 Answer 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pablo Alejandre del Rio
Top achievements
Rank 1
Pablo Alejandre del Rio asked on 23 Jun 2009, 11:13 AM
Hi Telerik:

I am using a radgridview  with a binding list as Data Source. The information I am showing is the Category ID and the Category Name.

Well, when a row is deleted , for instance, category id = 32, I want to move down the rest of categories ID  in order to fill that id, so now the 33 is 32, 34 is 33 and so on.

My second issue is with a new row. When I create a row the id is 0 by default. I want to change this to the next category ID for example 35.

So my idea is to modify the binding list in a event, for example when a row is deleted , modifing the categories Id in the  binding list  and rebind to the grid if necessary, but I don't know where to do it. And so  for a new row.

I found in the documentation an event called RowDeleting but I can't find it in the  designer, and  I don't know which is the event for a new row.

Any ideas ?

Regards.
Pablo

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 25 Jun 2009, 03:33 PM
Hello Pablo,

I have attached a sample application to demonstrate the RowsChanged and RowsChanging events and a way to solve your two issues.
Write back if you need further assistance.

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Pablo Alejandre del Rio
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or