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

RadGrid deleting

2 Answers 85 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Lighthouse Developer
Top achievements
Rank 1
Lighthouse Developer asked on 07 May 2010, 09:54 AM
Hi! I've implemented one of the examples for using the RadMenu as a context menu and it works for Insert and Edit but not for Delete. I think the command is not right, at least for my project.

            case "Delete":
                rgUsers.MasterTableView.PerformDelete(rgUsers.Items[radGridClickedRowIndex]);
                break;

This fires but nothing happens. Every other Delete link works. Both the CommandItem bar and the link on the row itself. Any help?

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 07 May 2010, 12:54 PM
Hello,

I tried your code and found its working fine on my end (using RadControls version 2009.3.1103.35). Can you please make sure that you are getting correct 'radGridClickedRowIndex' value?

Also try accessing corresponding item and invoke the "FireCommandEvent" method to perform delete. The documentation shows more on "FireCommandEvent" method.
How to fire command events from code

Regards,
Shinu.
0
Lighthouse Developer
Top achievements
Rank 1
answered on 07 May 2010, 12:58 PM
That worked! Don't know why the original command didn't work but firing the command that way worked. Thanks!
Tags
Menu
Asked by
Lighthouse Developer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Lighthouse Developer
Top achievements
Rank 1
Share this question
or