Can you read vb.net code? Here is an example.
Suppose you have a datatable.
Dim DA as datatable = new dataTable("MyTable")
//Suppose you have two column in DA, say "No" and "Name"
Dim tbs as DatagridTableStyle
tbs.mappingName = "MyTable"
tbs.gridlinecolor = system.drawing.color.lightgray
//....you can set other attribute here.
Dim tbc1 as new datagridtextboxcolumn()
tbc1.MappingName = "No"
tbc1.width = 40
tbs.gridstyles.add(tbc1)
Dim tbc2 as new datagridTextboxColumn()
tbc2.MappingName ="Name"
tbc2.width = 50
tbs.gridstyles.add(tbc2)
dataGridAdresse.DataSource = nothing
datagridAdresse.tablestyles.add(tbs)
dataGridAdresse.DataSource =DA
Hope it helps.
Tracey
-----Original Message-----
hi there...
i fill my datagrid with a DataTable :
DataTable DA = new DataTable();
sqlDA.Fill(DA);
dataGridAdresse.DataSource = DA;
now i would like to formate my datagrid but i don't know
how to use tableStyle with DataTable. who do i set the
width of a certain column ??is there anyone who could help me or provide me some
example ???
thank you very much !!!
jonas knaus
jo*********@naviti.ch
.