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

Margins around elements in default edit form

1 Answer 244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 17 Apr 2015, 06:30 PM
Is there a way to add margins around elements in the built in default edit form (AllowAutomaticUpdates="true")? The items are too close together. Sample attached. Thanks!

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 22 Apr 2015, 08:11 AM
Hi Darren,

You can set the EditFormSettings FormTableStyle-CellPadding property to add padding to each cell in the EditForm:
<telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView>
        <Columns>
            <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
        </Columns>
        <EditFormSettings FormTableStyle-CellPadding="5">                  
        </EditFormSettings>
    </MasterTableView>         
</telerik:RadGrid>

You could also style the form by using the .rgEditForm class:
<telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" CssClass="customStyles">
    <MasterTableView>
        <Columns>
            <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
        </Columns>
    </MasterTableView>         
</telerik:RadGrid>

And the CSS:
<style type="text/css">
    div.RadGrid.customStyles .rgEditForm td{
        padding-right: 10px;
    }
</style>

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Darren
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or