Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > How to generate datagrid without knowing # of rows (not retrieving form a database)

Reply
Thread Tools

How to generate datagrid without knowing # of rows (not retrieving form a database)

 
 
Hai Nguyen
Guest
Posts: n/a
 
      01-15-2004
Hi all

I'm trying to create form (can be anything, but a prefer it's a datagrid).
It should look like this

Header 1 Header 2 Header3 Header4 Header5
(textbox) (textbox) (textbox) (textbox)
(textbox)
(textbox) (textbox) (textbox) (textbox)
(textbox)
(textbox) (textbox) (textbox) (textbox)
(textbox)
(textbox) (textbox) (textbox) (textbox)
(textbox)


My question is:
1/ Since I don't know the number of row in advance, if I'm still be able to
generate datagrid with a particular number of row (let's say 10 rows)

2/ Because the header is stored in a ArrayList, how do i bind those to the
header

3/ After user fills out those textbox, I need to insert those infos to
database, how can I do that?

4/ If users want to insert more than the rows printing, how can they add
more rows?

I appreciate any idea to get this problem solve.

PS: If we can n't solve in datagrid, any solutions will be my big help

Thanks everyone




 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      01-15-2004
What you would need to do is build a datagrid manually one row at a time as
needed. When you construct a row, you will set the caption name and the
value items as you go along. This code creates 4 column datagrid. then adds
rows to it as needed

DataSet dsTemp = new DataSet();

DataTable Tables = new DataTable();

dsTemp.Tables.Add(Tables);

dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );

dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType(
"System.Double" ) );

dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType(
"System.Double" ) );

dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("dddd
MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );

dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("dddd
MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );

for(int col = 0; col < ds.Tables[0].Columns.Count; col++)

{

DataRow myRow = dsTemp.Tables[0].NewRow();

myRow[4]= 0.00;

if(Double.TryParse(ds2.Tables[0].Rows[0][col].ToString(),
System.Globalization.NumberStyles.Any,
System.Globalization.NumberFormatInfo.InvariantInf o, out input))

myRow[4]= input.ToString();


myRow[3]= 0.00;

if(Double.TryParse(ds.Tables[0].Rows[0][col].ToString(),
System.Globalization.NumberStyles.Any,
System.Globalization.NumberFormatInfo.InvariantInf o, out input))

myRow[3]= input.ToString();


if(Double.TryParse((Double.Parse(myRow[3].ToString()) -
Double.Parse(myRow[4].ToString())).ToString(),
System.Globalization.NumberStyles.Any,
System.Globalization.NumberFormatInfo.InvariantInf o, out input))

myRow[2]= input.ToString();

if(ds2.Tables[0].Rows[0][col].ToString().Trim() != String.Empty)

myRow[1]= Math.Round(((Double.Parse(myRow[2].ToString()) /
Double.Parse(ds2.Tables[0].Rows[0][col].ToString())) * 100),2);


myRow[0]= ds.Tables[0].Columns[col].ColumnName;

dsTemp.Tables[0].Rows.Add(myRow);

}

Feel free to modify the code as you see fit.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi all
>
> I'm trying to create form (can be anything, but a prefer it's a datagrid).
> It should look like this
>
> Header 1 Header 2 Header3 Header4 Header5
> (textbox) (textbox) (textbox) (textbox)
> (textbox)
> (textbox) (textbox) (textbox) (textbox)
> (textbox)
> (textbox) (textbox) (textbox) (textbox)
> (textbox)
> (textbox) (textbox) (textbox) (textbox)
> (textbox)
>
>
> My question is:
> 1/ Since I don't know the number of row in advance, if I'm still be able

to
> generate datagrid with a particular number of row (let's say 10 rows)
>
> 2/ Because the header is stored in a ArrayList, how do i bind those to the
> header
>
> 3/ After user fills out those textbox, I need to insert those infos to
> database, how can I do that?
>
> 4/ If users want to insert more than the rows printing, how can they add
> more rows?
>
> I appreciate any idea to get this problem solve.
>
> PS: If we can n't solve in datagrid, any solutions will be my big help
>
> Thanks everyone
>
>
>
>



 
Reply With Quote
 
 
 
 
Hai Nguyen
Guest
Posts: n/a
 
      01-15-2004
I'm sorry for asking you dump question. There are some part of your code I don't understand. Would you please feel free to explain it to me


dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType( "System.Double" ) );
dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType("System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("ddddMM/dd/yyyy"), System.Type.GetType"System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("ddddMM/dd/yyyy"), System.Type.GetType ("System.Double" ) );

What does it mean?

Thanks


"Alvin Bruney" <vapor at steaming post office> wrote in message news:%23FW%23z%(E-Mail Removed).. .
> What you would need to do is build a datagrid manually one row at a time as
> needed. When you construct a row, you will set the caption name and the
> value items as you go along. This code creates 4 column datagrid. then adds
> rows to it as needed
>
> DataSet dsTemp = new DataSet();
>
> DataTable Tables = new DataTable();
>
> dsTemp.Tables.Add(Tables);
>
> dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
>
> dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> for(int col = 0; col < ds.Tables[0].Columns.Count; col++)
>
> {
>
> DataRow myRow = dsTemp.Tables[0].NewRow();
>
> myRow[4]= 0.00;
>
> if(Double.TryParse(ds2.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[4]= input.ToString();
>
>
> myRow[3]= 0.00;
>
> if(Double.TryParse(ds.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[3]= input.ToString();
>
>
> if(Double.TryParse((Double.Parse(myRow[3].ToString()) -
> Double.Parse(myRow[4].ToString())).ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[2]= input.ToString();
>
> if(ds2.Tables[0].Rows[0][col].ToString().Trim() != String.Empty)
>
> myRow[1]= Math.Round(((Double.Parse(myRow[2].ToString()) /
> Double.Parse(ds2.Tables[0].Rows[0][col].ToString())) * 100),2);
>
>
> myRow[0]= ds.Tables[0].Columns[col].ColumnName;
>
> dsTemp.Tables[0].Rows.Add(myRow);
>
> }
>
> Feel free to modify the code as you see fit.
>
> --
> Regards,
> Alvin Bruney
> Got tidbits? Get it here...
> http://tinyurl.com/3he3b
> "Hai Nguyen" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi all
> >
> > I'm trying to create form (can be anything, but a prefer it's a datagrid).
> > It should look like this
> >
> > Header 1 Header 2 Header3 Header4 Header5
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> >
> >
> > My question is:
> > 1/ Since I don't know the number of row in advance, if I'm still be able

> to
> > generate datagrid with a particular number of row (let's say 10 rows)
> >
> > 2/ Because the header is stored in a ArrayList, how do i bind those to the
> > header
> >
> > 3/ After user fills out those textbox, I need to insert those infos to
> > database, how can I do that?
> >
> > 4/ If users want to insert more than the rows printing, how can they add
> > more rows?
> >
> > I appreciate any idea to get this problem solve.
> >
> > PS: If we can n't solve in datagrid, any solutions will be my big help
> >
> > Thanks everyone
> >
> >
> >
> >

>
>

 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      01-15-2004
this builds a grid like so
% variance raw variance Wednesday 01/14/2004 Wednesday 01/07/2004


then you build the rows to fill out the grid. Make sense?

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
I'm sorry for asking you dump question. There are some part of your code I don't understand. Would you please feel free to explain it to me


dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType( "System.Double" ) );
dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType("System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("ddddMM/dd/yyyy"), System.Type.GetType"System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("ddddMM/dd/yyyy"), System.Type.GetType ("System.Double" ) );

What does it mean?

Thanks


"Alvin Bruney" <vapor at steaming post office> wrote in message news:%23FW%23z%(E-Mail Removed).. .
> What you would need to do is build a datagrid manually one row at a time as
> needed. When you construct a row, you will set the caption name and the
> value items as you go along. This code creates 4 column datagrid. then adds
> rows to it as needed
>
> DataSet dsTemp = new DataSet();
>
> DataTable Tables = new DataTable();
>
> dsTemp.Tables.Add(Tables);
>
> dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
>
> dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> for(int col = 0; col < ds.Tables[0].Columns.Count; col++)
>
> {
>
> DataRow myRow = dsTemp.Tables[0].NewRow();
>
> myRow[4]= 0.00;
>
> if(Double.TryParse(ds2.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[4]= input.ToString();
>
>
> myRow[3]= 0.00;
>
> if(Double.TryParse(ds.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[3]= input.ToString();
>
>
> if(Double.TryParse((Double.Parse(myRow[3].ToString()) -
> Double.Parse(myRow[4].ToString())).ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[2]= input.ToString();
>
> if(ds2.Tables[0].Rows[0][col].ToString().Trim() != String.Empty)
>
> myRow[1]= Math.Round(((Double.Parse(myRow[2].ToString()) /
> Double.Parse(ds2.Tables[0].Rows[0][col].ToString())) * 100),2);
>
>
> myRow[0]= ds.Tables[0].Columns[col].ColumnName;
>
> dsTemp.Tables[0].Rows.Add(myRow);
>
> }
>
> Feel free to modify the code as you see fit.
>
> --
> Regards,
> Alvin Bruney
> Got tidbits? Get it here...
> http://tinyurl.com/3he3b
> "Hai Nguyen" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi all
> >
> > I'm trying to create form (can be anything, but a prefer it's a datagrid).
> > It should look like this
> >
> > Header 1 Header 2 Header3 Header4 Header5
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> >
> >
> > My question is:
> > 1/ Since I don't know the number of row in advance, if I'm still be able

> to
> > generate datagrid with a particular number of row (let's say 10 rows)
> >
> > 2/ Because the header is stored in a ArrayList, how do i bind those to the
> > header
> >
> > 3/ After user fills out those textbox, I need to insert those infos to
> > database, how can I do that?
> >
> > 4/ If users want to insert more than the rows printing, how can they add
> > more rows?
> >
> > I appreciate any idea to get this problem solve.
> >
> > PS: If we can n't solve in datagrid, any solutions will be my big help
> >
> > Thanks everyone
> >
> >
> >
> >

>
>

 
Reply With Quote
 
Hai Nguyen
Guest
Posts: n/a
 
      01-15-2004
Thank you Alvin, you are awesome


"Alvin Bruney" <vapor at steaming post office> wrote in message news:(E-Mail Removed)...
this builds a grid like so
% variance raw variance Wednesday 01/14/2004 Wednesday 01/07/2004


then you build the rows to fill out the grid. Make sense?

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
I'm sorry for asking you dump question. There are some part of your code I don't understand. Would you please feel free to explain it to me


dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType( "System.Double" ) );
dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType("System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("ddddMM/dd/yyyy"), System.Type.GetType"System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("ddddMM/dd/yyyy"), System.Type.GetType ("System.Double" ) );

What does it mean?

Thanks


"Alvin Bruney" <vapor at steaming post office> wrote in message news:%23FW%23z%(E-Mail Removed).. .
> What you would need to do is build a datagrid manually one row at a time as
> needed. When you construct a row, you will set the caption name and the
> value items as you go along. This code creates 4 column datagrid. then adds
> rows to it as needed
>
> DataSet dsTemp = new DataSet();
>
> DataTable Tables = new DataTable();
>
> dsTemp.Tables.Add(Tables);
>
> dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
>
> dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> for(int col = 0; col < ds.Tables[0].Columns.Count; col++)
>
> {
>
> DataRow myRow = dsTemp.Tables[0].NewRow();
>
> myRow[4]= 0.00;
>
> if(Double.TryParse(ds2.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[4]= input.ToString();
>
>
> myRow[3]= 0.00;
>
> if(Double.TryParse(ds.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[3]= input.ToString();
>
>
> if(Double.TryParse((Double.Parse(myRow[3].ToString()) -
> Double.Parse(myRow[4].ToString())).ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[2]= input.ToString();
>
> if(ds2.Tables[0].Rows[0][col].ToString().Trim() != String.Empty)
>
> myRow[1]= Math.Round(((Double.Parse(myRow[2].ToString()) /
> Double.Parse(ds2.Tables[0].Rows[0][col].ToString())) * 100),2);
>
>
> myRow[0]= ds.Tables[0].Columns[col].ColumnName;
>
> dsTemp.Tables[0].Rows.Add(myRow);
>
> }
>
> Feel free to modify the code as you see fit.
>
> --
> Regards,
> Alvin Bruney
> Got tidbits? Get it here...
> http://tinyurl.com/3he3b
> "Hai Nguyen" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi all
> >
> > I'm trying to create form (can be anything, but a prefer it's a datagrid).
> > It should look like this
> >
> > Header 1 Header 2 Header3 Header4 Header5
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> >
> >
> > My question is:
> > 1/ Since I don't know the number of row in advance, if I'm still be able

> to
> > generate datagrid with a particular number of row (let's say 10 rows)
> >
> > 2/ Because the header is stored in a ArrayList, how do i bind those to the
> > header
> >
> > 3/ After user fills out those textbox, I need to insert those infos to
> > database, how can I do that?
> >
> > 4/ If users want to insert more than the rows printing, how can they add
> > more rows?
> >
> > I appreciate any idea to get this problem solve.
> >
> > PS: If we can n't solve in datagrid, any solutions will be my big help
> >
> > Thanks everyone
> >
> >
> >
> >

>
>

 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      01-16-2004
just be sure to help someone else. that's what this place is about

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
Thank you Alvin, you are awesome


"Alvin Bruney" <vapor at steaming post office> wrote in message news:(E-Mail Removed)...
this builds a grid like so
% variance raw variance Wednesday 01/14/2004 Wednesday 01/07/2004


then you build the rows to fill out the grid. Make sense?

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Hai Nguyen" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
I'm sorry for asking you dump question. There are some part of your code I don't understand. Would you please feel free to explain it to me


dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType( "System.Double" ) );
dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType("System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("ddddMM/dd/yyyy"), System.Type.GetType"System.Double" ) );
dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("ddddMM/dd/yyyy"), System.Type.GetType ("System.Double" ) );

What does it mean?

Thanks


"Alvin Bruney" <vapor at steaming post office> wrote in message news:%23FW%23z%(E-Mail Removed).. .
> What you would need to do is build a datagrid manually one row at a time as
> needed. When you construct a row, you will set the caption name and the
> value items as you go along. This code creates 4 column datagrid. then adds
> rows to it as needed
>
> DataSet dsTemp = new DataSet();
>
> DataTable Tables = new DataTable();
>
> dsTemp.Tables.Add(Tables);
>
> dsTemp.Tables[0].Columns.Add( " ", System.Type.GetType( "System.String" ) );
>
> dsTemp.Tables[0].Columns.Add( "% variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( "raw variance", System.Type.GetType(
> "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-1).ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> dsTemp.Tables[0].Columns.Add( DateTime.Now.AddDays(-.ToString("dddd
> MM/dd/yyyy"), System.Type.GetType( "System.Double" ) );
>
> for(int col = 0; col < ds.Tables[0].Columns.Count; col++)
>
> {
>
> DataRow myRow = dsTemp.Tables[0].NewRow();
>
> myRow[4]= 0.00;
>
> if(Double.TryParse(ds2.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[4]= input.ToString();
>
>
> myRow[3]= 0.00;
>
> if(Double.TryParse(ds.Tables[0].Rows[0][col].ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[3]= input.ToString();
>
>
> if(Double.TryParse((Double.Parse(myRow[3].ToString()) -
> Double.Parse(myRow[4].ToString())).ToString(),
> System.Globalization.NumberStyles.Any,
> System.Globalization.NumberFormatInfo.InvariantInf o, out input))
>
> myRow[2]= input.ToString();
>
> if(ds2.Tables[0].Rows[0][col].ToString().Trim() != String.Empty)
>
> myRow[1]= Math.Round(((Double.Parse(myRow[2].ToString()) /
> Double.Parse(ds2.Tables[0].Rows[0][col].ToString())) * 100),2);
>
>
> myRow[0]= ds.Tables[0].Columns[col].ColumnName;
>
> dsTemp.Tables[0].Rows.Add(myRow);
>
> }
>
> Feel free to modify the code as you see fit.
>
> --
> Regards,
> Alvin Bruney
> Got tidbits? Get it here...
> http://tinyurl.com/3he3b
> "Hai Nguyen" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi all
> >
> > I'm trying to create form (can be anything, but a prefer it's a datagrid).
> > It should look like this
> >
> > Header 1 Header 2 Header3 Header4 Header5
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> > (textbox) (textbox) (textbox) (textbox)
> > (textbox)
> >
> >
> > My question is:
> > 1/ Since I don't know the number of row in advance, if I'm still be able

> to
> > generate datagrid with a particular number of row (let's say 10 rows)
> >
> > 2/ Because the header is stored in a ArrayList, how do i bind those to the
> > header
> >
> > 3/ After user fills out those textbox, I need to insert those infos to
> > database, how can I do that?
> >
> > 4/ If users want to insert more than the rows printing, how can they add
> > more rows?
> >
> > I appreciate any idea to get this problem solve.
> >
> > PS: If we can n't solve in datagrid, any solutions will be my big help
> >
> > Thanks everyone
> >
> >
> >
> >

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Use rowspan without knowing how many rows? Martin HTML 2 11-11-2005 05:29 PM
datagrid generate rows =?Utf-8?B?Qm9vbmFhcA==?= ASP .Net 1 03-18-2005 03:12 PM
Recurse over a hash without knowing any elements (except top level) Christopher Perl 2 02-16-2004 06:04 AM
Datagrid without knowing the # of row in advance Hai Nguyen ASP .Net 0 01-15-2004 01:51 AM



Advertisments