DataGrid Object Help

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I have a dataGrid whose datasource is a populated
dataTable object. The dataTable consists of two columns
and data is often cleared and repopulated during user
interaction. I have two questions:

1. Does anyone know how to programmatically set a
column to a specific width (percentage or pixels, etc)?
2. Does anyone know how to show a subset of a
DataTable's columns?
3. Does anyone know how to force a mouse click event
to highlight (select) the entire row as if it were
clicked at the leftmost column?

Gary
 
Hi Garry,

Have a look at datagridtablestyles and inside that the gridcolumnstyles
Can do for you, more than you expect now I think

I hope this helps,

Cor
 
Ken

Thanks for your response. I was able to implement my
desired functionality.

One note, however, the article located at
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dv_vstechart/html/vbtchformattingwindowsformsdatagridvi
sualbasicprimer.asp did not make it clear that the
obj.MappingName properties being set, are being set to
values that map directly to table names and column
names. I may have missed some important explanatory text
somewhere in the article and thought the string
assignments were arbitrary.

I just wanted to give you some feedback. Again, thanks
for your help.

Gary
 
Back
Top