Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

odd DataGrid behaviour

0 views
Skip to first unread message

kfrank

unread,
Oct 8, 2008, 7:11:02 AM10/8/08
to
My form creates a DataGrid named 'grid' at runtime, assigns a DataTable named
'InvDT' as the grid's .DataSource, and then positions the grid on the form.
The form then lets user do various things, which result in one or more rows
being added to the 'InvDT' DataTable. Everything's working grand, data shows
up in the grid automatically.

But, I'm trying to add an EDIT menu-function for the current-row (if any) in
the grid. And, no matter what row is highlighted in the grid, the value for
'grid.CurrentRowIndex' is ALWAYS -1.

I've used DataGrids before and never experienced this before, but those
datagrids were always placed on the form at design-time. Am I missing
something obvious? One other detail: the 'InvDT' datatable starts out with
columns defined, but no rows in it, at the time when it is set to the grid's
.DataSource.

kfrank

unread,
Oct 8, 2008, 7:48:02 AM10/8/08
to
Doh, a few details are always nice...

Studio2005, c#, targetting PocketPC 2003. Problem occurs whether I'm
stepping thru via debug in the emulator, or either of 2 WindowsMobile5
devices.

0 new messages