Datagrid table display method

Discussion in 'ASP .Net Datagrid Control' started by csgraham74@gmail.com, Jul 30, 2006.

  1. Guest

    Hi guys,

    Just wondering if someone could help me.

    I have a datagrid that displays client data A & B. If client data A is
    displayed then i display an image and some data in the table in my
    grid.

    If client data b is displayed the image is not displayed and i display
    slightly different data in my table in my datagrid.

    The information is bound to my datagrid using the following method
    Databinder.eval(Container.DataItem, "name") etc..

    the problem that i have is that i want to display both clients
    datatypes A & B in the same table e.g. all A types at the top of the
    grid then all the B types directly below them and i want to use one
    datagrid. How to i change the HTML to display both types ?????

    Any helkp appreciated


    CG
     
    , Jul 30, 2006
    #1
    1. Advertising

  2. Make an item template that will cater for both datatypes. Handle
    ItemDataBound event and for every data item show/hide controls in the
    template depending on the datatype.
    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]

    <> wrote in message
    news:...
    > Hi guys,
    >
    > Just wondering if someone could help me.
    >
    > I have a datagrid that displays client data A & B. If client data A is
    > displayed then i display an image and some data in the table in my
    > grid.
    >
    > If client data b is displayed the image is not displayed and i display
    > slightly different data in my table in my datagrid.
    >
    > The information is bound to my datagrid using the following method
    > Databinder.eval(Container.DataItem, "name") etc..
    >
    > the problem that i have is that i want to display both clients
    > datatypes A & B in the same table e.g. all A types at the top of the
    > grid then all the B types directly below them and i want to use one
    > datagrid. How to i change the HTML to display both types ?????
    >
    > Any helkp appreciated
    >
    >
    > CG
    >
     
    Eliyahu Goldin, Jul 30, 2006
    #2
    1. Advertising

  3. Guest

    thanks for the help

    I actually ended up writing a function that response.writes the table
    structure in text back to the html page. i dont think this is the most
    economical way of doing this but it works and the project is quite
    small so il probably leave it at that.

    Thanks

    Colin

    Eliyahu Goldin wrote:
    > Make an item template that will cater for both datatypes. Handle
    > ItemDataBound event and for every data item show/hide controls in the
    > template depending on the datatype.
    > --
    > Eliyahu Goldin,
    > Software Developer & Consultant
    > Microsoft MVP [ASP.NET]
    >
    > <> wrote in message
    > news:...
    > > Hi guys,
    > >
    > > Just wondering if someone could help me.
    > >
    > > I have a datagrid that displays client data A & B. If client data A is
    > > displayed then i display an image and some data in the table in my
    > > grid.
    > >
    > > If client data b is displayed the image is not displayed and i display
    > > slightly different data in my table in my datagrid.
    > >
    > > The information is bound to my datagrid using the following method
    > > Databinder.eval(Container.DataItem, "name") etc..
    > >
    > > the problem that i have is that i want to display both clients
    > > datatypes A & B in the same table e.g. all A types at the top of the
    > > grid then all the B types directly below them and i want to use one
    > > datagrid. How to i change the HTML to display both types ?????
    > >
    > > Any helkp appreciated
    > >
    > >
    > > CG
    > >
     
    , Jul 31, 2006
    #3
  4. Ok, the first rule of software engineering is not to touch what works:)

    Anyway, for your next task note, that asp.net is object-oriented. That is
    you operate on objects and properties rather than programming action
    procedures.
    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]

    <> wrote in message
    news:...
    > thanks for the help
    >
    > I actually ended up writing a function that response.writes the table
    > structure in text back to the html page. i dont think this is the most
    > economical way of doing this but it works and the project is quite
    > small so il probably leave it at that.
    >
    > Thanks
    >
    > Colin
    >
    > Eliyahu Goldin wrote:
    >> Make an item template that will cater for both datatypes. Handle
    >> ItemDataBound event and for every data item show/hide controls in the
    >> template depending on the datatype.
    >> --
    >> Eliyahu Goldin,
    >> Software Developer & Consultant
    >> Microsoft MVP [ASP.NET]
    >>
    >> <> wrote in message
    >> news:...
    >> > Hi guys,
    >> >
    >> > Just wondering if someone could help me.
    >> >
    >> > I have a datagrid that displays client data A & B. If client data A is
    >> > displayed then i display an image and some data in the table in my
    >> > grid.
    >> >
    >> > If client data b is displayed the image is not displayed and i display
    >> > slightly different data in my table in my datagrid.
    >> >
    >> > The information is bound to my datagrid using the following method
    >> > Databinder.eval(Container.DataItem, "name") etc..
    >> >
    >> > the problem that i have is that i want to display both clients
    >> > datatypes A & B in the same table e.g. all A types at the top of the
    >> > grid then all the B types directly below them and i want to use one
    >> > datagrid. How to i change the HTML to display both types ?????
    >> >
    >> > Any helkp appreciated
    >> >
    >> >
    >> > CG
    >> >

    >
     
    Eliyahu Goldin, Jul 31, 2006
    #4
    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 Williams
    Replies:
    2
    Views:
    1,136
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Replies:
    2
    Views:
    3,781
    =?Utf-8?B?RWx0b24gVw==?=
    May 5, 2005
  3. Rio
    Replies:
    4
    Views:
    1,199
  4. Jam Pa
    Replies:
    3
    Views:
    466
    Spartanicus
    Apr 28, 2005
  5. Junaid Hussain

    NEW User: How do I display table on DataGrid without clicking on '+'.

    Junaid Hussain, Dec 24, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    118
Loading...

Share This Page