PC Review


Reply
Thread Tools Rate Thread

Creating tables during runtime

 
 
=?Utf-8?B?TmV3Ymll?=
Guest
Posts: n/a
 
      11th Feb 2005
Hello!

I'm trying to figure out how to do the following:

I need to show a table (perhaps using DataGrids, repeaters or others) for
each salesperson in the sales dept. But the no. of tables to be shown is to
be determined during runtime. It's possible that some salespersons have no
sales figures to begin with and therefore no table to show. Thanks in advance
and please help!
 
Reply With Quote
 
 
 
 
Chris, Master of All Things Insignificant
Guest
Posts: n/a
 
      11th Feb 2005
If you just need to create a datatable

DataTable DT = new DataTable;
DT.Columns.Add("Col Name");

DataRow R;
R = DT.NewRow;
R[0] = "Row 1";
DT.Rows.Add(R);

DataGrid1.DataSource = DT;

Hope that helps. Note: Syntax might not be perfect, converted it over from
VB in my head.

Chris



"Newbie" <(E-Mail Removed)> wrote in message
news:08886D28-FA3E-482E-BD2A-(E-Mail Removed)...
> Hello!
>
> I'm trying to figure out how to do the following:
>
> I need to show a table (perhaps using DataGrids, repeaters or others) for
> each salesperson in the sales dept. But the no. of tables to be shown is
> to
> be determined during runtime. It's possible that some salespersons have no
> sales figures to begin with and therefore no table to show. Thanks in
> advance
> and please help!



 
Reply With Quote
 
=?Utf-8?B?TmV3Ymll?=
Guest
Posts: n/a
 
      11th Feb 2005
Hi Chris,

If I place a Panel on a Webform, then insert a Table (let's call this Outer
Table - only has one column) inside the Panel, and then insert another Table
(call it Inner Table) in one of the rows of the Outer Table, is there a way
to add new rows for the Outer Table during runtime? If so, is there a way to
replicate what's on the old row to the new row? In other words, is there a
way to copy what's on the existing row and replicate it on the newly added
row? I'm thinking that this is probably a way to add tables using DataGrids
during runtime. Each DataGrid sitting in each row. Thanks in advance.

Newbie


"Chris, Master of All Things Insignifican" wrote:

> If you just need to create a datatable
>
> DataTable DT = new DataTable;
> DT.Columns.Add("Col Name");
>
> DataRow R;
> R = DT.NewRow;
> R[0] = "Row 1";
> DT.Rows.Add(R);
>
> DataGrid1.DataSource = DT;
>
> Hope that helps. Note: Syntax might not be perfect, converted it over from
> VB in my head.
>
> Chris
>
>
>
> "Newbie" <(E-Mail Removed)> wrote in message
> news:08886D28-FA3E-482E-BD2A-(E-Mail Removed)...
> > Hello!
> >
> > I'm trying to figure out how to do the following:
> >
> > I need to show a table (perhaps using DataGrids, repeaters or others) for
> > each salesperson in the sales dept. But the no. of tables to be shown is
> > to
> > be determined during runtime. It's possible that some salespersons have no
> > sales figures to begin with and therefore no table to show. Thanks in
> > advance
> > and please help!

>
>
>

 
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
Add Tables Cell at runtime Samuel Microsoft ASP .NET 0 1st Sep 2008 06:27 PM
Re: Set link to tables at runtime Douglas J. Steele Microsoft Access Getting Started 1 3rd Apr 2008 11:56 AM
Creating archive tables for Access tables joined to Sybase tables =?Utf-8?B?QXJjaGl2ZSBUYWJsZXM=?= Microsoft Access External Data 0 11th Jan 2006 10:31 PM
Creating new database tables and indexes from existing tables =?Utf-8?B?U2hlbGJ5?= Microsoft C# .NET 1 30th Sep 2004 05:57 PM
creating runtime tabpages with runtime controls C# Elp Microsoft C# .NET 1 16th Jul 2004 04:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:44 PM.