HighTechTalks DotNet Forums  

Datagrid table display method

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Datagrid table display method in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Datagrid table display method - 07-30-2006 , 08:21 AM






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


Reply With Quote
  #2  
Old   
Eliyahu Goldin
 
Posts: n/a

Default Re: Datagrid table display method - 07-30-2006 , 09:29 AM






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]

<csgraham74 (AT) gmail (DOT) com> wrote

Quote:
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




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Datagrid table display method - 07-31-2006 , 07:58 AM



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:
Quote:
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]

csgraham74 (AT) gmail (DOT) com> wrote in message
news:1154262111.645723.25260 (AT) i42g2000cwa (DOT) googlegroups.com...
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



Reply With Quote
  #4  
Old   
Eliyahu Goldin
 
Posts: n/a

Default Re: Datagrid table display method - 07-31-2006 , 09:14 AM



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]

<csgraham74 (AT) gmail (DOT) com> wrote

Quote:
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]

csgraham74 (AT) gmail (DOT) com> wrote in message
news:1154262111.645723.25260 (AT) i42g2000cwa (DOT) googlegroups.com...
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





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.