PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

VB.NET Datagrids

 
 
simchajoy2000@yahoo.com
Guest
Posts: n/a
 
      15th Jul 2004
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
 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      15th Jul 2004
Hi,

Add a tablestyle to your datagrid.

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

Ken
-------------------
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      16th Jul 2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Databinding Combobox to Master/Detail DataGrids Beth Massi [Architect MVP] Microsoft Dot NET Framework 2 14th Apr 2005 05:36 PM
HELP-Sorted Datagrids and modal dialogs =?Utf-8?B?aGVscA==?= Microsoft Dot NET Framework 2 10th May 2004 07:01 PM
Export multiple datagrids on web page to Excel Steve Chatham Microsoft Excel Programming 0 24th Feb 2004 08:23 PM
Two DataGrids on One Form? Could be simple solution, but I can't findcontrol !!! ssoss Microsoft ADO .NET 5 19th Sep 2003 04:21 PM
Navigating DataGrids: How to access information in Child Tables Gregory Persson Microsoft ADO .NET 1 14th Jul 2003 04:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:36 PM.