HI
I need a grid which is having coloums on top and left side also.
like a cross tab grid
is this possible dot net
Printable View
HI
I need a grid which is having coloums on top and left side also.
like a cross tab grid
is this possible dot net
Yes, you have two options:
1. DataGrid: If you want the user to be able to add/delete/edit all the fields. You can customize its appearance to your needs.
2. ListView: If you want fancy looking list, but the user can only do little editing.
i need a row heading as we have column heading please tell me how to do that.Quote:
Originally Posted by jhammer
What exactly do you need in this "Row Heading"? Number? Words?What is the length of the heading?
please see the attached file its a jpg file you can get the view as what i want the grid to look like.
The solution is simple. Take the System.Windows.Forms.DataGrid class and you have the grid and all you need. After that you can use DataGridTableStyles and DataGridColumnStyles for customizing the look.
Hi torrud
pls give me some code for that coz i was looking on the net but not find useful code.
or may be i m lil confused regarding this.
For start, I suggest you drag a DataGrid to the form. Then Right-Click on it, and select AutoFormat. Choose something, and see that the appearance of the grid changed. You can check the properties of the DataGrid, to see all the color properties and play with it.
The DataGrid has a TableStyles property. You can click on it, and press Add. You will see there is ColumnStyles property. The MappingName is the name of the field in the table datasource. You can play with the background color, and set it to gray.
After you press ok, you can switch to Code View, go to the InitializeComponents method and see how this is done in code.
This would be a good start.
Quote:
Originally Posted by jhammer
i got some idea but still confuse how to change the text of RowHeader
The text in RowHeader should be the first column in the grid. The table you are showing will have a column "RowHeader" for example, and each row will be assign with its appropriate row header. This will be shown in the first column of the grid (By setting the ColumnStyles)