Datagrid on two tables

Discussion in 'ASP .Net' started by Vik, Apr 14, 2004.

  1. Vik

    Vik Guest

    Is it possible to have a dataview and a datagrid based on two or more tables
    in a dataset?

    Thank you.
    Vik, Apr 14, 2004
    #1
    1. Advertising

  2. Vik

    Curt_C [MVP] Guest

    I think you will have to specify the table... why would you want to though?
    I mean I can't think of a use. if you need data from both use a join, use
    the resulting view to display

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Vik" <viktorum@==hotmail.com==> wrote in message
    news:...
    > Is it possible to have a dataview and a datagrid based on two or more

    tables
    > in a dataset?
    >
    > Thank you.
    >
    >
    Curt_C [MVP], Apr 14, 2004
    #2
    1. Advertising

  3. Vik

    Marina Guest

    Are you using a data adapter and a command builder to do the update?

    In that case, you can change the select statement of the data adapter to be
    a SELECT with just the columns from the first table, generate the command
    builder and do the update. Then change the select statement to be a SELECT
    with just the columns from the second table, generate the command builder,
    and do the update.

    That way your original query can be a join, but then using this method you
    should be able to update both database tables.

    "Vik" <viktorum@==hotmail.com==> wrote in message
    news:%...
    > If I use a view (one to many), I can't update the data. So, I want two
    > separate tables in the dataset that I can updated and I want the datagrid
    > representing the join of these tables.
    >
    > Vik
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:...
    > > I think you will have to specify the table... why would you want to

    > though?
    > > I mean I can't think of a use. if you need data from both use a join,

    use
    > > the resulting view to display
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > www.Darkfalz.com
    > >
    > >
    > > "Vik" <viktorum@==hotmail.com==> wrote in message
    > > news:...
    > > > Is it possible to have a dataview and a datagrid based on two or more

    > > tables
    > > > in a dataset?
    > > >
    > > > Thank you.
    > > >
    > > >

    > >
    > >

    >
    >
    Marina, Apr 14, 2004
    #3
  4. Vik

    Vik Guest

    If I use a view (one to many), I can't update the data. So, I want two
    separate tables in the dataset that I can updated and I want the datagrid
    representing the join of these tables.

    Vik

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > I think you will have to specify the table... why would you want to

    though?
    > I mean I can't think of a use. if you need data from both use a join, use
    > the resulting view to display
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > www.Darkfalz.com
    >
    >
    > "Vik" <viktorum@==hotmail.com==> wrote in message
    > news:...
    > > Is it possible to have a dataview and a datagrid based on two or more

    > tables
    > > in a dataset?
    > >
    > > Thank you.
    > >
    > >

    >
    >
    Vik, Apr 14, 2004
    #4
  5. Vik

    Vik Guest

    Thank you.

    "Marina" <> wrote in message
    news:%...
    > Are you using a data adapter and a command builder to do the update?
    >
    > In that case, you can change the select statement of the data adapter to

    be
    > a SELECT with just the columns from the first table, generate the command
    > builder and do the update. Then change the select statement to be a SELECT
    > with just the columns from the second table, generate the command builder,
    > and do the update.
    >
    > That way your original query can be a join, but then using this method you
    > should be able to update both database tables.
    >
    > "Vik" <viktorum@==hotmail.com==> wrote in message
    > news:%...
    > > If I use a view (one to many), I can't update the data. So, I want two
    > > separate tables in the dataset that I can updated and I want the

    datagrid
    > > representing the join of these tables.
    > >
    > > Vik
    > >
    > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > news:...
    > > > I think you will have to specify the table... why would you want to

    > > though?
    > > > I mean I can't think of a use. if you need data from both use a join,

    > use
    > > > the resulting view to display
    > > >
    > > > --
    > > > Curt Christianson
    > > > Owner/Lead Developer, DF-Software
    > > > www.Darkfalz.com
    > > >
    > > >
    > > > "Vik" <viktorum@==hotmail.com==> wrote in message
    > > > news:...
    > > > > Is it possible to have a dataview and a datagrid based on two or

    more
    > > > tables
    > > > > in a dataset?
    > > > >
    > > > > Thank you.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Vik, Apr 16, 2004
    #5
    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. David Wier

    Re: Datagrid based on two tables

    David Wier, Aug 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    338
    David Wier
    Aug 5, 2003
  2. TN Bella
    Replies:
    1
    Views:
    457
    TN Bella
    Jun 15, 2004
  3. Mike

    two tables one datagrid

    Mike, Jul 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    605
    Craig Deelsnyder
    Jul 5, 2004
  4. Bennett Haselton
    Replies:
    2
    Views:
    14,264
    Bennett Haselton
    Oct 7, 2004
  5. Paolo

    Two dropdownlist and two tables...

    Paolo, Sep 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    117
    Paolo
    Sep 19, 2006
Loading...

Share This Page