CSS on!
You really don't have CSS? Then you should find the CSS information.
For example, your CSS file has the following content:
class1{width:20%;}
class2{width:30%;}
Then write your datagrid, you do not use it the default wording, will autogenrated (this word I forgot how to spell) set to False, and then bind themselves to the template inside the DataGrid, in each item inside set, God, I just looked at your post, This just understand that you are just using the original function of the DataGrid?
Look at the following wording:
<asp:datagrid id= "Programmaticid" Runat=server
Datasource= ' <%# databindingexpression%> '
Autogeneratecolumns= "False"
(Other properties) >
<asp:TemplateColumn>
footertext= "Footertext"
Headerimageurl= "url"
headertext= "HeaderText"
Readonly= "true| False "
Sortfield= "Datasourcefieldtosortby"
Visible= "true| False "
<HeaderTemplate>
Header Template HTML
<ItemTemplate>
ItemTemplate HTML
</ItemTemplate>
<EditItemTemplate>
EditItem Template HTML
</EditItemTemplate>
<FooterTemplate>
Footer Template HTML
</FooterTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
You can then specify a cssclass for each template, or set it directly inside, so you don't have to use CSS anymore.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.