473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

VB.NET Datagrids

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
2 1437
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
1
by: Simon Harris | last post by:
Hi All, I wish to populate more than one datagrid from the same OleDBCommand. The code I have is: Dim objCmd As New OleDbCommand(strSql, objConn) Then... ...
4
by: ree32 | last post by:
I have a placeholder and depending on a user input(a drop downlist) when the user clicks a button I dynamically create a number of datagrids and fill them with data from a database. But the problem...
0
by: Scott Meddows | last post by:
I'm having trouble scrolling some datagrids so they sync up... I have two identical datagrids on a form, filled with eh same dataset. I want a user to be able to scroll on the datasets and the...
4
by: | last post by:
Hello. In SQL Server Query Analyzer, if I type in, say, 2 select queries, it returns 2 datagrids of results, with a scrollbar on the right to scroll between the 2 (or more) datagrids. I wanted to...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Jim | last post by:
OK here's my disclaimer: I'm very new to ASP.NET and posting on Google Groups, so please bear with me and feel free to correct either the way I code or the way I post. I have an ASP.NET page...
1
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, I am using the code below to export a webpage to Excel. The webpage has three datagrids on it and they are all exported to Excel properly and everything looks very nice, but we would really...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.