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

buttons in editcolumn

3 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thomas Luck
Top achievements
Rank 1
Thomas Luck asked on 12 Apr 2010, 09:10 AM
Hi,

In my Datagrid, I added 3 Buttons in the edit column, the 1 is edit, and if you click there save and cancel will be shown.
But now my problem there is that this both buttons are on top of each other instead of side by side.

I tried to fix this with floating left. But this is not a good solution, and works only in a few browsers.

Has anyone any idea how to fix this?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Apr 2010, 09:32 AM
Hello Thomas,

Have you tried placing buttons in table structure as shown below?

aspx:
 
<telerik:GridTemplateColumn> 
    <ItemTemplate> 
        <asp:Button ID="EditButton" runat="server" Text="Edit" CommandName="Edit" /> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <table> 
            <tr> 
                <td> 
                    <asp:Button ID="SaveButton" runat="server" Text="Save" CommandName="Save" /> 
                </td> 
                <td> 
                    <asp:Button ID="CancelBtn" runat="server" Text="Cancel" CommandName="Cancel" /> 
                </td> 
            </tr> 
        </table> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

Thanks,
Princy.
0
Thomas Luck
Top achievements
Rank 1
answered on 12 Apr 2010, 09:49 AM
Hey Princy,
Thanks for the fast answer, but I can't do this on that way.
Because, this both buttons are generatet automatic by a .net componet (Telerik Webcontrols).
Our whole UI is handlet by a c# code, and we should not do anything in aspx.
0
Thomas Luck
Top achievements
Rank 1
answered on 12 Apr 2010, 10:20 AM
I think I got it.
I changed again the width of the column, but this time to 80 instead of 50.
I don't know why 50 wasn't working because the buttons has inlcuding the padding between surly not more than 43 px.
But it works now and shouldn't break anything else :)
Tags
Grid
Asked by
Thomas Luck
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Thomas Luck
Top achievements
Rank 1
Share this question
or