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

Gridview which events to use

2 Answers 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Geoff
Top achievements
Rank 1
Geoff asked on 12 May 2016, 05:07 PM

I do not normally work on the desktop and I am really struggling with the grid view.

I have a number of basic maintenace forms that have a grid on them. I thought I would see if I code manage with the add, update an delet buttons by using the grids bulit in functions but I cannot get my head round which way I should be going.

 

I have an ubound grid which I am loading from a list of custom objects. I am loading it unbound so I can use the built in drag drop to re order the items.

I am handling the delete in RowsChanging so I can validate the process and cancel if required, this seems to work but if this is not good please advise?

I was trying to to deal with the add and update in RowsChanging and Rows Changed but I have run into all sort of issues so I guess this is the wrong approach.

If anyone some guidance on this I would be very grateful.

Thanks

Goff

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Geoff
Top achievements
Rank 1
answered on 13 May 2016, 03:59 PM

DOH! Please disregard this, I was thinking about it all wrong!

I have now figured it out and it works a treat.

0
Hristo
Telerik team
answered on 16 May 2016, 03:23 PM
Hi Geoff,

Thank you for writing.

Suitable places to perform the validation before adding and deleting rows are the UserAddingRow and UserDeletingRow events. Additional information is available in the following documentation resources:
I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Geoff
Top achievements
Rank 1
Answers by
Geoff
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or