|
You can accomplish in three ways. First will be use of Properties view
in Visual Studio .Net IDE. Click on the DataGrid in design view and then choose Properties
viw. There you will see ItemStyle section, as shown in the picture
on left. There you can specify all the properties. This way all the necessary
tag and its attribues will be added to aspx page containing the
control.
Second way would be to driectly type in ItemStyle tag within DataGrid
control block in aspx file. And then specify the attributes like
BackColor, Font, etc.
Third style will be the programatic way, in CodeBehind file. There you
can set values for all the properties in ItemStyle property. So if
you want to manipulate the header style at run time, then you will definitely
need to know the programtic way of doing it. But if you want to keep header
style static, which is the case most of the time, then you can use the design
time feature.
|