BUG? VS2007 DataGrid.IsSelected( ) method doesn't work (MSDN Universal Subscriber)
- From: "frostbb" <barry.b.frost@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 14 May 2007 10:06:33 -0800
1st I know about the new DataGridView control. For various reasons we need
the IsSelected( ) method of the old DataGrid to work in the upgraded apps.
I have a small test app that illustrates the problem.
The following code works great in C# Net 1.0 & Net 1.1 apps ... doesn't work
for Net 2.0 apps.
Cannot get pDg.IsSelected(i) to toggle to 'true' for 'highlighted' rows in a
DataGrid control.
private int CountSelectedDataGridRows(DataGrid pDg)
{
int i = 0;
int iSelectedRowCount = 0;
CurrencyManager cm =
(CurrencyManager)this.BindingContext[pDg.DataSource, pDg.DataMember];
DataView dv = (DataView)cm.List;
for (i = 0; i < dv.Count; ++i)
{
if ( pDg.IsSelected(i) )
{
++iSelectedRowCount;
}
}
return iSelectedRowCount;
}
Any help would be greatly appreciated. We are MSDN Universal subscribers.
Does MS still monitor this group?
Thanks in advance.
Barry
in Oregon
.
- Prev by Date: Re: List<> of struct with property. Cannot change value of property. why?
- Next by Date: Re: How to click a checkbox programmatically?
- Previous by thread: Selectcommand with variable
- Next by thread: How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer.
- Index(es):
Relevant Pages
|