By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 910 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

VB.NET Datagrids

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Add a tablestyle to your datagrid.

http://msdn.microsoft.com/library/de...asicprimer.asp

Ken
-------------------
<si***********@yahoo.com> wrote in message
news:1d**************************@posting.google.c om...
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

Nov 20 '05 #2

P: n/a
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
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.