Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
|
When Web Matrix created the MxDataGrid, it configured the grid to look a certain way. You can easily change the look of the grid, still without writing any code.
Change the grid s appearance
-
Close the browser if it s still open.
-
In the FriendsDisplay page in Web Matrix, select the MxDataGrid control.
-
In the Properties window, open the Font node and set the Name property to Verdana,Arial,Helvetica. (Remember that it s common in Web applications to provide backup font names in case users don t have your first choice of fonts.)
-
Set the Font Size property to x-small.
-
Open the AlternatingItemStyle node in the Properties window. For the BackColor property select a light color. This will set the color of every other row in the grid.
-
Set the PageSize property to 3. Assuming you have four or more rows, this allows you to play with paging in the grid.
-
Run the page again to see the results of your settings.
As you can see, you can customize the look of the grid quite a bit. If you have enough rows to make up more than one page, click the numbers at the bottom to see paging in action.
|