473,385 Members | 1,727 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,385 software developers and data experts.

Datagrid Question in VS 2003

For Example, I have one table (TimeTable) and one datagrid (tGrid). I get
data from database and put it in table "ClassInfo"

I try to write likes this..

Dim DR As DataRow
Dim classNo as Integer

classNO = ClassInfo.Rows(0).Item("FCLASS")
DR = weekTable.NewRow()

For x = 0 to ClassInfo.rows.count()-1
If classNo <ClassInfo.Rows(x).Item("FCLASS")
TimeTable.Rows.Add(DR)
classNo = ClassInfo.Rows(x).Item("FCLASS")
DR = TimeTable.NewRow()
End If
DR.Item("sch"+Trim(Str(x))) = ClassInfo.rows(0).item("Class") + CHR(13)
+ ClassInfo.rows(0).item("ClassTech")
Next

Expect Result
Maths
Patrick English
Sue Chinese
Lee
Science
Paul Music
Jenny PT
Kong
But...come out Result as following
MathsPatrick EnglishSue ChineseLee
SciencePaul MusicJenny PTKong
Any One have Hints..how to do that.

Thx
Localbar


Sep 12 '07 #1
0 1053

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bill Sonia | last post by:
It seems whenever I set a DataGrid.DataSource = DataTable (vb.net) to populate a datagrid, the scroll bars on the datagrid default to disabled. And the only way I can get them to enable is to...
7
by: Billy Jacobs | last post by:
I am using a datagrid to display some data. I need to create 2 header rows for this grid with columns of varying spans. In html it would be the following. <Table> <tr> <td colspan=8>Official...
3
by: Hoodworld | last post by:
Hi All, I have a ASP.Net application written in C# with the use of Visual Studio 2003. When I develop and test the application in my company using ASP.Net Framework 1.4.33.2 in Windows XP...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
3
by: David | last post by:
Hello, I have a datagrid populated with rows from a view. Because they are from a view, the rows are not actual database records, and therefore lack unique identifiers. So I have a command...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Gene Hubert | last post by:
I'm looking to use a datagrid in an odd way and not making a lot of progress. I want to read in a text file and then allow a user to arbitraily divide the data into columns. I thought I might be...
4
by: Mark Waser | last post by:
I've discovered a very odd bug when attempting to put a dropdown list in a datagrid. In the page PreRender step, the selected index of the datagrid is successfully set during databinding. Yet,...
4
by: G .Net | last post by:
Hi I have a question which I hope you can help with. I am setting the DataSource of a DataGrid to be a DataView. I am sorting the DataView by various fields which include a Date. When I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.