Get DataGrids DataSource

Discussion in 'ASP .Net Datagrid Control' started by Vishal, Jan 19, 2005.

  1. Vishal

    Vishal Guest

    Does anybody know how I can get the datasource of a
    datagrid? FOr example, If I bind a ds to a datagrid, then
    I would like to get the ds back somehow. Is that possible,
    if so how?

    Thanks
    Vishal, Jan 19, 2005
    #1
    1. Advertising

  2. Vishal

    Elton Wang Guest

    If you know it's DataSet, you can

    DataSet ds = (DataSet)datagrid.DataSource;

    Hope it's helpful.

    Elton Wang


    >-----Original Message-----
    >Does anybody know how I can get the datasource of a
    >datagrid? FOr example, If I bind a ds to a datagrid, then
    >I would like to get the ds back somehow. Is that

    possible,
    >if so how?
    >
    >Thanks
    >.
    >
    Elton Wang, Jan 19, 2005
    #2
    1. Advertising

  3. Vishal

    VIshal Guest

    Already tried and it doesnt work. I am 100% sure that it
    is a ds. I used the debugger and saw that the datsource is
    nothing. How can that be? I am using denis bauers datagrid
    and this is happening in the nested datagrid, which is a
    normal datagrid. Can somebody help?


    >-----Original Message-----
    >If you know it's DataSet, you can
    >
    >DataSet ds = (DataSet)datagrid.DataSource;
    >
    >Hope it's helpful.
    >
    >Elton Wang
    >
    >
    >>-----Original Message-----
    >>Does anybody know how I can get the datasource of a
    >>datagrid? FOr example, If I bind a ds to a datagrid,

    then
    >>I would like to get the ds back somehow. Is that

    >possible,
    >>if so how?
    >>
    >>Thanks
    >>.
    >>

    >.
    >
    VIshal, Jan 19, 2005
    #3
    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. sJeev via DotNetMonster.com

    Help Please! Can't edit my datagrids/get the right content

    sJeev via DotNetMonster.com, Jan 27, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    279
    sJeev via DotNetMonster.com
    Jan 27, 2005
  2. vips
    Replies:
    7
    Views:
    6,284
    pushpakladdha
    May 11, 2006
  3. Alan Silver
    Replies:
    2
    Views:
    6,652
    Alan Silver
    Jul 12, 2005
  4. Replies:
    0
    Views:
    343
  5. joe data

    Binding multiple datagrids to the same datasource

    joe data, Apr 27, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    405
    joe data
    Apr 27, 2004
Loading...

Share This Page