How to get rid of gridline in datagrid?

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)
 
J

Jeremy Cowles

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
 
T

Tracey

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

Can someone kindly tell me why ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top