Datagrid Columns as Row Labels ?

  • Thread starter Thread starter alan
  • Start date Start date
A

alan

Hi,

Not sure if i'm phrasing this correctly but is it possible to format my
datagrid with the colums as row labels/headers ?

I've got one record with 12 fields and rather than displaying this as
one row across a web page i want to display it as two columns (row
labels, values)

something like this:

Value
col/row A
col/row B
col/row C

thanks in advance

alan
 
You might want to try table Html server control.
It would be something like
<table runat="server" id="tblWhatever">
<tr runat="server">
<td runat="server">FieldName</td>
<td runat="server" id="cellFieldName"><%#
DataBinder.Eval(Container.DataItem, "fieldName" %></td>
</tr>

You could build a row for each field. Just a suggestion.
~CK
 
thanks for the quick reply...
i'm pretty new to .net so i'm just about getting to grips with the
whole dataset/datagrid thing...
i'm guessing the databinder takes care of the database side of
things...
i've also been looking at tablecounters but havent tried it out yet...

thanks again,
alan
 
Back
Top