Now I'm an MCP
I passed 70-315 yesterday; it was easier than I expected.
What I didn't expect was that I'd actually learn a few things from the test. For example:
What I didn't expect was that I'd actually learn a few things from the test. For example:
- The DataGrid class (control) has a read-only property named Columns of type DataGridColumnCollection.
The DataGridColumnCollection type is a collection of objects derived from DataGridColumn (such as BoundColumn).
DataGridColumn has a read-only property named ItemStyle of type TableItemStyle.
The TableItemStyle class has a property named CssClass.
So, setting datagrid.columns[0].ItemStyle.CssClass = "myClass" can be done in the page-in-front as:
<asp:DataGrid runat="server" id="datagrid">
<Columns>
<asp:BoundColumn DataField="name">
<ItemStyle CssClass="myClass" />
</asp:BoundColumn>
</Columns>
</asp:DataGrid>
or
<asp:DataGrid runat="server" id="datagrid">
<Columns>
<asp:BoundColumn DataField="name" ItemStyle-CssClass="myClass"/>
</Columns>
</asp:DataGrid> - Using the RequiredFieldValidator's InitialValue is useful when you want the user to select any item except the first in a drop down list.
0 Comments:
Post a Comment
<< Home