A
Arpan
An ASPX page retrieves records from a database table & displays them in
a DataGrid. Assume that one of the columns in the DB table is "Country"
which is rendered in the DataGrid as ButtonColumn whose ButtonType is
set to "PushButton" using the following code snippet:
<form runat="server">
<aspataGrid ID="dgUsers" runat="server">
<Columns>
<asp:ButtonColumn DataTextField="Country" ButtonType="PushButton"
HeaderText="COUNTRY"/>
</Columns>
</aspataGrid>
</form>
Now it's very much possible that, on most occasions, the countries
different users belong to won't be the same. For e.g. some will be from
India, some from Holland, some from Australia, some from France, some
from USA etc. Now since the length of the country names aren't the
same, the width of the buttons vary depending upon the length of the
country names. This gives a shabby look to the page.
How do I ensure that the width of all the buttons remain the same
irrespective of the length of the country names?
Thanks,
Arpan
a DataGrid. Assume that one of the columns in the DB table is "Country"
which is rendered in the DataGrid as ButtonColumn whose ButtonType is
set to "PushButton" using the following code snippet:
<form runat="server">
<aspataGrid ID="dgUsers" runat="server">
<Columns>
<asp:ButtonColumn DataTextField="Country" ButtonType="PushButton"
HeaderText="COUNTRY"/>
</Columns>
</aspataGrid>
</form>
Now it's very much possible that, on most occasions, the countries
different users belong to won't be the same. For e.g. some will be from
India, some from Holland, some from Australia, some from France, some
from USA etc. Now since the length of the country names aren't the
same, the width of the buttons vary depending upon the length of the
country names. This gives a shabby look to the page.
How do I ensure that the width of all the buttons remain the same
irrespective of the length of the country names?
Thanks,
Arpan