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

Inset command item. Align Button to far right.

4 Answers 398 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 11 Jun 2013, 02:43 PM
Good Morning,

I am using the radGrid and I have a command item for an add new record button.

<telerik:RadGrid ID="grdSearchCriteria" runat="server" GridLines="None" AllowSorting="False"

AutoGenerateColumns="False" ShowStatusBar="False" ShowFooter="false" AllowFilteringByColumn="False" AllowPaging="false"

AllowAutomaticInserts="False" width="750px" EnableViewState="True" >

<MasterTableView CommandItemDisplay="Top" GridLines="None" DataKeyNames="" AllowMultiColumnSorting="False" EditMode="InPlace" ShowFooter="false" ShowHeader="False">

<CommandItemStyle HorizontalAlign="Right" />

<CommandItemSettings ShowRefreshButton="false" AddNewRecordText="Add New Criteria" ></CommandItemSettings>

<Columns>

<telerik:GridButtonColumn HeaderStyle-HorizontalAlign="Right" CommandName="Delete" Text="Remove" UniqueName="DeleteColumn"></telerik:GridButtonColumn>

<telerik:GridTemplateColumn HeaderText="Field Name" Visible="True" UniqueName="FieldNames" >

<ItemTemplate>

<asp:DropDownList ID="ddFieldNames" runat="server"></asp:DropDownList>

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Operator" Visible="True" UniqueName="Operators" >

<ItemTemplate>

<asp:DropDownList ID="ddOperators" runat="server"></asp:DropDownList>

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>



I need to get the button for "Add New Criteria" to align to the Far right of the grid.  But I can not seem to get this to happen.

Hel;p?

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jun 2013, 03:05 PM
Hi,

Please set the following CSS property,you can change according to your width size of radgrid.I have attached the screen shot of what i have got.

CSS:
.RadGrid_Default .rgCommandRow a
{
    float: right !important;
    margin-left: 1029px;
    position: absolute;
   
}
 
.RadGrid_Default .rgAdd
 {
    float: right!important;
    margin-left: 1113px;
    position: absolute;
}

Thanks
Princy
0
Bill
Top achievements
Rank 1
answered on 11 Jun 2013, 03:35 PM
Thanks for the fast reply. 

That worked pretty well.  However the Insert button is now incorrectly aligned vertically.  Please see attached.  The button is too low. Any ideas?

Thank You.
0
Accepted
Princy
Top achievements
Rank 2
answered on 12 Jun 2013, 03:56 AM
Hi,

Please set the following CSS property.Make changes accordingly.

CSS:
.RadGrid_Default .rgCommandRow a {
    color: #000000;
    float: right !important;
    margin-left: 1145px;
    position: absolute;
    top: 13px;
    text-decoration: none;
}
.RadGrid_Default .rgAdd {
    position: absolute;
    float: right !important;  
    top:13px;
    left:1140px;
}

Thanks,
Princy
0
Bill
Top achievements
Rank 1
answered on 12 Jun 2013, 11:39 AM
Thank you.

That did it.
Tags
Grid
Asked by
Bill
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Bill
Top achievements
Rank 1
Share this question
or