|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Set the style of the datagrid
I have the following problem:<br><br> I have a datagrid, which gets the data from a datatable.<br><br> I attached a CSSClass to the datagrid, but I don't know how can I make the header have a particular style.<br> I saw the generated code by "View source" and it looks something like that<br><br><br> <div class="msgQuoteWrap"><div class="msgCode"><table><br> <tr class="someClass"><br> <td> Name </td><br> </tr> <tr><br> <td> John Doe </td><br> </tr><br> </table></div></div><br><br><br> Name is the name of the column, so I expected it to be between "th", "/th" tags, rather than between "td", "/td" tags, so I don't know how to specify that it shoud use a different CSSClass than the regular records in the table.<br><br> If you know how this can be done, please respond.<br><br> Alina
|
|
#2
|
|||
|
|||
|
Instead of the CSSClass which applies to all of the datagrid, use the HeaderStyle value.
|
|
#3
|
|||
|
|||
|
data grid view style
well u can have detail discussion about ur problem in
professional ASP.net (Wrox ) page 305 Adding Style and templates with data grid controls |
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Set the style of the datagrid |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|