473,396 Members | 2,151 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,396 software developers and data experts.

Datagrid Programmatic

Hi everyone

I have to generate a bunch of datagrids. The # number of datagrids needed
will be told by a method.
That's why I have to build an array of datagrids

.....
Datagrids[] grids = new Datagrids[numberofgrids];

// initialize grids ....
.....

Everything works find. The only question I would like to know why after I
creat each datagrid programatically, I can not see it.

Did I miss something? Please instruct me.

Thanks


Nov 18 '05 #1
3 1077
a datagrid only makes an appearance when and only when it contains bound
data. you will have to bind to the new datagrid to get them to show up

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
Hi everyone

I have to generate a bunch of datagrids. The # number of datagrids needed
will be told by a method.
That's why I have to build an array of datagrids

....
Datagrids[] grids = new Datagrids[numberofgrids];

// initialize grids ....
....

Everything works find. The only question I would like to know why after I
creat each datagrid programatically, I can not see it.

Did I miss something? Please instruct me.

Thanks

Nov 18 '05 #2
Which DataGrid are you talking, Win Form or Web control?

If it is win form, besides you "new" to create instance(s) of DataGrid, you
also have to add the instatnce(s) to a container control, such as Form or
Panel, by calling Controls.Add() or Controls.AddRange(), in order for the
DataGrid(s) to visibly show.

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
Hi everyone

I have to generate a bunch of datagrids. The # number of datagrids needed
will be told by a method.
That's why I have to build an array of datagrids

....
Datagrids[] grids = new Datagrids[numberofgrids];

// initialize grids ....
....

Everything works find. The only question I would like to know why after I
creat each datagrid programatically, I can not see it.

Did I miss something? Please instruct me.

Thanks

Nov 18 '05 #3
Sorry, I thought I was in another NG. This IS asp.net NG, so the DataGrid is
web one.

"Norman Yuan" <no********@RemoveThis.shaw.ca> wrote in message
news:4LgOb.150836$ts4.115219@pd7tw3no...
Which DataGrid are you talking, Win Form or Web control?

If it is win form, besides you "new" to create instance(s) of DataGrid, you also have to add the instatnce(s) to a container control, such as Form or
Panel, by calling Controls.Add() or Controls.AddRange(), in order for the
DataGrid(s) to visibly show.

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:O9**************@TK2MSFTNGP10.phx.gbl...
Hi everyone

I have to generate a bunch of datagrids. The # number of datagrids needed will be told by a method.
That's why I have to build an array of datagrids

....
Datagrids[] grids = new Datagrids[numberofgrids];

// initialize grids ....
....

Everything works find. The only question I would like to know why after I creat each datagrid programatically, I can not see it.

Did I miss something? Please instruct me.

Thanks


Nov 18 '05 #4

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

Similar topics

6
by: Dave Boyd | last post by:
Are there arguments for the built-in commands called via RunCommand such as acCmdNewObjectReport or do they always require interactive input? Is the code behind the built-in commands exposed...
5
by: Jim | last post by:
is it possible to add a row to a Windows datagrid witthout having a datatable? I need to add a row to the datagrid control. Thanks.
3
by: MikeM | last post by:
I've been trying to locate some property or method that will allow programmatic access to the "loginUrl" attribute in the web.config file in the <system.web> -> <authentication> element when the...
0
by: Daniel | last post by:
programmatic to ftp virtual directories when i connect to an ftp server and i only have access to a few of the ftp virtual directories, do i just change directory to them after connecting and...
6
by: Blaine Manyluk | last post by:
I have a very unusual request. I need to be able to generate reports and save them as TIF files, with full programmatic control. The application will provide the filenames. Each page of the...
2
by: williamphenryjr | last post by:
This is a long post. If you have answers I'm ready. If you have web links, that'd be great too. I'm a Junior/Senior in Computer Science at Washington State University, so you can make some...
2
by: myzm | last post by:
I want to provide a menu for user to log out system after they logged in using the Login control. Nowhere I can find information about programmatic logout. Any help? Thanks.
2
by: matt.delvecchio | last post by:
hello, i have a user control that works great, when its used as a design-time controls. however, when i try to use it as a programmtic control, im running into troubles. the control is pretty...
0
by: jigsawcube1 | last post by:
I am trying to accept two input strings and concatinate and display the result in a datagrid. Following is the HTML and code. ItemCommand does not get fired what is that I am missing? <body...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.