VB.NET Datagrids

S

simchajoy2000

Hi,

In the VB.NET code behind ASP.NET, the programmer is able to directly
access the columns and rows associated with the datagrid. Why are
datagrids in VB.NET window forms so different? The only way I have
figured out how to manipulate the columns and rows in a datagrid is to
use data tables. So if I want to change any values contained in the
datagrid table or to hide or show different columns depending on
different criteria, I must first copy datagrid.datasource over to a
data table and then make the necessary changes to the data table. Is
this the only way to work with datagrids in VB.NET forms??

Joy
 
C

Cor Ligthert

Hi Joy,

They both have the name datagrid however that and some appearancing is the
only thing they have equal, it had been better when Microsoft had made a
name distinct as the did with the dropdown, the dropdownlist and the
combobox, however they did not and that you cannot turn back.

Funny is that accessing a datagrid on a windowform is much easier than on a
webform, however because you are used of the disadvantages from a webform
you probably want to take the same approach.

Main difference, the datasource of a datagrid on a webform gets disconnected
when it is sended, on a winform it stays as long as it is not disconnected
by you.

Therefore try to access the datagrid (in)directly using its datasource and
than in a while probably you would wish (like me) that this was as well the
system on a webform.

Have a look for that especially for dataview which made it very easy (also
to find as defaultview).

I hope this helps,

Cor
 

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