fully editable Datagrid..not bound to database..

Discussion in 'ASP .Net Datagrid Control' started by Karthik, Jan 11, 2005.

  1. Karthik

    Karthik Guest

    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


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Karthik, Jan 11, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    715
  2. Peter Walburn

    Fully editable datagrid

    Peter Walburn, Sep 3, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    9
    Views:
    150
  3. Viren

    Fully multiple, editable dynamic datagrid.

    Viren, Oct 20, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    149
    Alvin Bruney
    Oct 20, 2003
  4. Pawan Gupta

    Fully Editable Datagrid

    Pawan Gupta, May 19, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    153
    SoftLion
    May 19, 2004
  5. fizzy

    fully editable datagrid causing crash

    fizzy, Jun 21, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    115
    Elton Wang
    Jun 21, 2005
Loading...

Share This Page