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

Move rows client side and then save to database

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luis Pacheco
Top achievements
Rank 1
Luis Pacheco asked on 03 Jul 2010, 01:37 AM
Hi! I need your help. I need to allow the client user to modify the order of the rows, for expample:

Number     Question      
    1           ¿What is your name?          Up  Down
    2           ¿How are you?         Up  Down
    3           ¿Do you like cars?   Up  Down

SAVE


The client can change the order of the rows, and finally click save button to save the changes made in the order. I found the follow example: Data Grid Reorder Moverows 

You add a templatecolumn

<asp:TemplateColumn> 
                <ItemTemplate> 
                    <asp:ImageButton runat="server" ToolTip="Click to move this row up" ImageUrl="~/App_Themes/WEBSWAPP/images/up.gif" 
                        ID="btnUp" CommandName="MoveUp" /> 
                    <asp:ImageButton runat="server" ToolTip="Click here to move this row down" ImageUrl="~/App_Themes/WEBSWAPP/images/down.gif" 
                        ID="ImageButton1" CommandName="MoveDown" /> 
                </ItemTemplate> 
            </asp:TemplateColumn> 

But when i try to cath the event onCommand dosen't fire. I search and i found that radgrid don't fire the event. Somebody have another idea please??  

Thanks

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 07 Jul 2010, 11:08 AM
Hello Luis,

When you have image buttons in a GridTemplateColumn, a custom command with name MoveUp and MoveDown should be fired invoking RadGrid's ItemCommand event. However, I see an <asp:TemplateColumn> definition. Are you referring to RadGrid or some other control here?

Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Luis Pacheco
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or