Hi,
I am using a Telerik RadGrid in my project.
The concept is i will use single grid for the whole project.
In that grid SelectColumn[one checkbox column],Edit and Delete columns are common for all pages.
Other column will vary based on the page.
So i have set 'AutoGenerateColumn = true'.
And i have created 3 static columns i.e) one.GridClientSelectColumn and two GridButtonColumns [one for delete and another one for edit].
At run time i will bind the grid as 'AutoGeneratecolumn = true' other columns will come based the datasource.
I have assigned the 'Item-Style' for the Horizontal and Vertical alignments.But it is not working.
Here is my code in aspx
But still Select checkbox, Edit image and Delete image and other column Text all are left aligned.
What is the problem?
I need to set vertical aligned middle and horizondal aligned center...
Please give me the solution.
Thanks,
Kumar
I am using a Telerik RadGrid in my project.
The concept is i will use single grid for the whole project.
In that grid SelectColumn[one checkbox column],Edit and Delete columns are common for all pages.
Other column will vary based on the page.
So i have set 'AutoGenerateColumn = true'.
And i have created 3 static columns i.e) one.GridClientSelectColumn and two GridButtonColumns [one for delete and another one for edit].
At run time i will bind the grid as 'AutoGeneratecolumn = true' other columns will come based the datasource.
I have assigned the 'Item-Style' for the Horizontal and Vertical alignments.But it is not working.
Here is my code in aspx
<MasterTableView> |
<Columns> |
<Telerik:GridClientSelectColumn UniqueName="SelectColumn" ItemStyle-HorizontalAlign="Center" |
ItemStyle-VerticalAlign="Middle"> |
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> |
</Telerik:GridClientSelectColumn> |
<Telerik:GridButtonColumn UniqueName="EditColumn" CommandName="View" ButtonType="ImageButton" |
ImageUrl="~/img/Edit.gif" Text="Edit" HeaderText="Edit" ItemStyle-Width="20px" |
HeaderStyle-Width="20px" ItemStyle-HorizontalAlign="Center" Resizable="false" |
Visible="false"> |
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> |
</Telerik:GridButtonColumn> |
<Telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" Text="Delete" |
HeaderText="Delete" ButtonType="ImageButton" ImageUrl="~/img/Delete_Telerik.gif" |
ConfirmText="Are you sure you want to delete?" ItemStyle-VerticalAlign="Middle" |
ConfirmTitle="Delete" HeaderStyle-Width="20px" ItemStyle-HorizontalAlign="Center" |
Resizable="false"> |
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" /> |
</Telerik:GridButtonColumn> |
</Columns> |
<NoRecordsTemplate> |
<table width="100%" style="height: 75px;" border="0" cellpadding="1" cellspacing="1"> |
<tr align="left"> |
<td align="left" valign="middle"> |
<br /> |
<br /> |
No records to display |
</td> |
</tr> |
</table> |
</NoRecordsTemplate> |
</MasterTableView> |
But still Select checkbox, Edit image and Delete image and other column Text all are left aligned.
What is the problem?
I need to set vertical aligned middle and horizondal aligned center...
Please give me the solution.
Thanks,
Kumar