Re: Repost: VS2005 - is DataGrid.IsSelected( ) broken ? (still an MS 'managed' group?)
- From: "Mel" <Mel.RemoveSpam@xxxxxxxxxxxxx>
- Date: Tue, 8 May 2007 08:21:12 -0500
You should use the new DataGridView in 2..0. There is a property called
SelectedRows which return a collection.
"frostbb" <barry.b.frost@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:uqGxQWPkHHA.4112@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- Follow-Ups:
- References:
- Prev by Date: Re: Generic type converter class. Cant call static method of type T.
- Next by Date: Re: Rolling back file errors
- Previous by thread: Repost: VS2005 - is DataGrid.IsSelected( ) broken ? (still an MS 'managed' group?)
- Next by thread: Re: Repost: VS2005 - is DataGrid.IsSelected( ) broken ? (still an MS 'managed' group?)
- Index(es):
Relevant Pages
|