K
Karthik
Hello ppl
I read an article in this forum regarding constructing a datagrid not
bound to a database. My question is on those line..though not exactly
the same. Here is my problem...I have a datagrid which has columns from
2 datasets (populated from different tables in database). I constrcuted
the columns for a datagrid with these datasets.
The first dataset contains the column Serial Number. The second dataset
contains the Parameters needed to be measured for this Serial Number as
rows...which inturn have to be shown as columns in my datagrid.
Lets say
SerialNumberDataset contains column
SerialNumber(column)
Serial1
Serial2
Serial3
Serial4
Serial5
ParameterDataset contains the following
ParameterName(Column)
Parameter1
Parameter2
Parameter3
Using these two datasets I form the datagrid column by column with the
SerialNumber being a bound column and the Parameter columns being
template columns with textboxes for users to enter values.
My datagrid should look like
SerialNumber Parameter1 Parameter2 Parameter3
Serial1 (textbox) (textbox) (textbox)
Serial2 (textbox) (textbox) (textbox)
Serial3 (textbox) (textbox) (textbox)
Serial4 (textbox) (textbox) (textbox)
Serial5 (textbox) (textbox) (textbox)
where textbox is the place where user fills up data.
Finally I have a Submit button when clicked all these values are
inserted into another database table which has fields
SerialNumber ParameterName ParameterValue(textbox value)
Serial1 Parameter1 (textbox value)
Serial1 Parameter2 (textbox value)
Serial1 Parameter3 (textbox value)
Serial2 Parameter1 (textbox value)
Serial2 Parameter2 (textbox value)
Serial2 Parameter3 (textbox value)
..
..
..
..
..
etc.
So this completes my question. I hope my explanation was clear enough. I
have got the datagrid to display the way I want. But when I fill up the
textboxes and click the Submit button, my datagrid dissapears. I know it
is beacuse the page is posting back....but I dont know how to
take care of this. I have bound the datagrid in a function. If I bind
the datagrid again when click the Submit button, I lose all the data I
entered in the textboxes.
I'm completely helpless on this. I'd be grateful if you could help me on
this. If you need any more explanation I'd be pleased to do so.
Thanks in advance.
Karthik
I read an article in this forum regarding constructing a datagrid not
bound to a database. My question is on those line..though not exactly
the same. Here is my problem...I have a datagrid which has columns from
2 datasets (populated from different tables in database). I constrcuted
the columns for a datagrid with these datasets.
The first dataset contains the column Serial Number. The second dataset
contains the Parameters needed to be measured for this Serial Number as
rows...which inturn have to be shown as columns in my datagrid.
Lets say
SerialNumberDataset contains column
SerialNumber(column)
Serial1
Serial2
Serial3
Serial4
Serial5
ParameterDataset contains the following
ParameterName(Column)
Parameter1
Parameter2
Parameter3
Using these two datasets I form the datagrid column by column with the
SerialNumber being a bound column and the Parameter columns being
template columns with textboxes for users to enter values.
My datagrid should look like
SerialNumber Parameter1 Parameter2 Parameter3
Serial1 (textbox) (textbox) (textbox)
Serial2 (textbox) (textbox) (textbox)
Serial3 (textbox) (textbox) (textbox)
Serial4 (textbox) (textbox) (textbox)
Serial5 (textbox) (textbox) (textbox)
where textbox is the place where user fills up data.
Finally I have a Submit button when clicked all these values are
inserted into another database table which has fields
SerialNumber ParameterName ParameterValue(textbox value)
Serial1 Parameter1 (textbox value)
Serial1 Parameter2 (textbox value)
Serial1 Parameter3 (textbox value)
Serial2 Parameter1 (textbox value)
Serial2 Parameter2 (textbox value)
Serial2 Parameter3 (textbox value)
..
..
..
..
..
etc.
So this completes my question. I hope my explanation was clear enough. I
have got the datagrid to display the way I want. But when I fill up the
textboxes and click the Submit button, my datagrid dissapears. I know it
is beacuse the page is posting back....but I dont know how to
take care of this. I have bound the datagrid in a function. If I bind
the datagrid again when click the Submit button, I lose all the data I
entered in the textboxes.
I'm completely helpless on this. I'd be grateful if you could help me on
this. If you need any more explanation I'd be pleased to do so.
Thanks in advance.
Karthik