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

Update / Cancel Button Order in GridEditCommandColumn

2 Answers 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Levin
Top achievements
Rank 2
Brian Levin asked on 26 Aug 2010, 08:58 PM
Hello,

We have some RadGrids using InPlace editing and have a GridEditCommandColumn where we use ImageButtons for Edit, Update, and Cancel.  This functionality works great except I'd like to have the Cancel Button on the left and the Update button on the right (it currently defaults the other way around).  Normally this wouldn't be a big deal, but we have a Web standard in place that says all Cancel buttons should precede Save buttons.  Here's what my code for GridEditCommandColumn looks like:

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditImageUrl="/Common/Images/GridIcons/Edit.png" ButtonType="ImageButton" CancelImageUrl="/Common/Images/GridIcons/Cancel.png" UpdateImageUrl="/Common/Images/GridIcons/Save.png"   ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false" ItemStyle-Width="60px" HeaderStyle-Width="60px" />

Is there a way I can change the order of the Save and Cancel buttons?  Even if there is a programmatic way in code to do this, that solution would work as well.  Thank you in advance for your reply!

Brian

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Aug 2010, 07:30 AM
Hello Brian,


You could use GridTemplateColumn as an alternate for GridEditCommandColumn, so that it is easy to customize the column appearance as per requirement.

In the EditItemTemplate section, you can decide the button order to display. Go through the following link to know more.
RadGrid GridEditCommandColumn



-Shinu.
0
Brian Levin
Top achievements
Rank 2
answered on 31 Aug 2010, 06:43 PM
Thank you very much Shinu!  That was exactly what I needed.  Following your advice worked perfectly.  I really appreciate you taking the time to answer my question so quickly!
Tags
Grid
Asked by
Brian Levin
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Brian Levin
Top achievements
Rank 2
Share this question
or