Column width in the incredibly lame datagrid

  • Thread starter Thread starter Earl
  • Start date Start date
E

Earl

Is it true that you can only change column widths at the time you assign a
column style and must have a mapped table name to do so?? What about using
it unbound?
 
Earl comcast net> said:
Is it true that you can only change column widths at the time you assign a
column style and must have a mapped table name to do so??
AFAIK, yes.

What about using
it unbound?
How so? You need to bind it to something, a DataTable/DataSet/DataView or
IList object or I don't think you are going to be able to do antyhing with
it.
 
Hiya Bill. Well, when I said "unbound", I meant directly to a datasource,
but I see your point. You're certainly correct that it has to bind to
"something".

I envision doing something as shown below in order to set up a grid that
contains labels in the left column and a single record in the right column.
The idea of making users scroll horizontally on the PPc seems anathema to
me. I don't really want to "bind" a data table as much as I would like to
bind all of the fields of a single record into 1 column (rotated if you
will).

If you have a solution, I'm all ears. Thanks.

***********************************************

dt.Columns.Add(dcLeftStatic)
dt.Columns.Add(dcRightDynamic)

x = 1

Do
If x < rowcount Then

row = dt.NewRow()
row("Labels") = arrayStaticLeft
row("Incoming Data") = arrayDynamicRight
dt.Rows.Add(row)

x = x + 1

Else
Exit Do
End If
Loop

**************************************************************
 
Earl comcast net> said:
Hiya Bill. Well, when I said "unbound", I meant directly to a datasource,
but I see your point. You're certainly correct that it has to bind to
"something".
And all of those things will need IList implemented or will need to be a
bindable object.
I envision doing something as shown below in order to set up a grid that
contains labels in the left column and a single record in the right column.
The idea of making users scroll horizontally on the PPc seems anathema to
me. I don't really want to "bind" a data table as much as I would like to
bind all of the fields of a single record into 1 column (rotated if you
will).

Restructure your datatable so you only have one datacolumn at any given time
then, Each column can be transposed as a row, and you can bind to this.
However, this seems a little peculiar, so if I'm misunderstanding the
problem, please let me know.

HTH,

Bill

www.devbuzz.com
www.knowdotnet.com
 
Back
Top