HELP: Edit a DataSet (not DataGrid)

Discussion in 'ASP .Net' started by Dhruba Bandopadhyay, May 23, 2006.

  1. I have a DataGrid which has checkbox columns. The data source is a run-time
    created data set that I store in a session so I can rebind it during
    postbacks. I don't have a database or xml file, etc.

    I am wondering if it's possible to edit a dataset directly? So when I click
    on a checkbox it will change the value in the dataset and store it back into
    session?

    If this is not possible how can I use arrays or vectors to temporary store
    my checkbox statuses? I guess it's not possible to have one DataGrid have
    more than one datasource...
     
    Dhruba Bandopadhyay, May 23, 2006
    #1
    1. Advertising

  2. Dhruba Bandopadhyay

    Kerem OZMAN Guest

    Re: Edit a DataSet (not DataGrid)

    Hi,
    Yes it is possible. Suppose you have a dataset named northwindDataSet and
    it has one table named Customers in it. Then to change a field on a specific
    row (first row for this sample) of Custommers you should write something
    like:
    northwindDataSet.Tables["Customers"].Rows[0]["CustomerID"] = "ALFZI";

    Note that here CustomerID is a field on Customers table. Then you can store
    dataset in session state.
    "Dhruba Bandopadhyay" <> wrote in message
    news:...
    >I have a DataGrid which has checkbox columns. The data source is a run-time
    >created data set that I store in a session so I can rebind it during
    >postbacks. I don't have a database or xml file, etc.
    >
    > I am wondering if it's possible to edit a dataset directly? So when I
    > click on a checkbox it will change the value in the dataset and store it
    > back into session?
    >
    > If this is not possible how can I use arrays or vectors to temporary store
    > my checkbox statuses? I guess it's not possible to have one DataGrid have
    > more than one datasource...
    >
    >
     
    Kerem OZMAN, May 23, 2006
    #2
    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. San Diego Guy
    Replies:
    0
    Views:
    588
    San Diego Guy
    Aug 7, 2003
  2. Schultz
    Replies:
    3
    Views:
    602
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  3. dhruba.bandopadhyay

    HELP: Edit a DataSet (not DataGrid)

    dhruba.bandopadhyay, May 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    dhruba.bandopadhyay
    May 23, 2006
  4. Sharon McCarty
    Replies:
    0
    Views:
    281
    Sharon McCarty
    Nov 24, 2004
  5. Frank Kurka
    Replies:
    8
    Views:
    345
Loading...

Share This Page