How to get rid of gridline in datagrid?

  • Thread starter Thread starter Tracey
  • Start date Start date
T

Tracey

I used the following code to get rid of gridline of
datagrid1. However, the gridline are still there.
Can someone tell me what's wrong with that?

Dim tablestyle as new tablestyle
with tablestyle
.gridlinestyle = none
.mappingname = ctype(datagrid1.datasource, datatable)
end with

datagrid1.tablestyles.add(tablestyle)
 
I used the following code to get rid of gridline of
datagrid1. However, the gridline are still there.
Can someone tell me what's wrong with that?

Dim tablestyle as new tablestyle
with tablestyle
.gridlinestyle = none
.mappingname = ctype(datagrid1.datasource, datatable)
end with

..mappingname is = "{System.DataTable}", that is not the mapping you want, is
it? Try changing it like this:

.mappingname = CType(datagrid1.datasource, datatable).TableName

HTH

~
Jeremy
 
Yes, you are right. I didn't wrote it correctly.
But it is not the real reason.

Can someone kindly tell me why ?
 
Back
Top