I have a datagrid, when I hold shift and navigate through the grid I am able
to multi select rows. How can I prevent multi selecting rows?

--
Thanks
Wayne Sepega
Jacksonville, Fl

Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg

"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

Re: DataGrid multi select by raj

raj
Fri Aug 19 04:43:38 CDT 2005

Hi,

You can do it in different ways. But I think best will be to override
the Select method. Keet track of last selected row in a property. In
the overridden Select first unselect the last selected row and select
the currentrowindex.
The code will be like this...

public new void Select(int vintRowToSelect)
{
if(intCurrentDataGridRowIndex > -1)
{
base.UnSelect(intCurrentDataGridRowIndex);
}
base.Select(vintRowToSelect);
}

I hope this helps

Cheers
Raj
Wayne wrote:
> I have a datagrid, when I hold shift and navigate through the grid I am able
> to multi select rows. How can I prevent multi selecting rows?
>
> --
> Thanks
> Wayne Sepega
> Jacksonville, Fl
>
> Enterprise Library Configuration Console Module Generator
> http://workspaces.gotdotnet.com/elccmg
>
> "When a man sits with a pretty girl for an hour, it seems like a minute. But
> let him sit on a hot stove for a minute and it's longer than any hour.
> That's relativity." - Albert Einstein


Re: DataGrid multi select by Bjarke

Bjarke
Fri Aug 19 04:44:01 CDT 2005

Wayne wrote:
>
> I have a datagrid, when I hold shift and navigate through the grid I am able
> to multi select rows. How can I prevent multi selecting rows?

Hi Wayne.

http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q839q

/B.


RE: DataGrid multi select by swashi

swashi
Fri Aug 19 04:59:19 CDT 2005

hi,
multi selection of rows can be prevented by setting datagrids
MultiSelect property to false



"Wayne" wrote:

> I have a datagrid, when I hold shift and navigate through the grid I am able
> to multi select rows. How can I prevent multi selecting rows?
>
> --
> Thanks
> Wayne Sepega
> Jacksonville, Fl
>
> Enterprise Library Configuration Console Module Generator
> http://workspaces.gotdotnet.com/elccmg
>
> "When a man sits with a pretty girl for an hour, it seems like a minute. But
> let him sit on a hot stove for a minute and it's longer than any hour.
> That's relativity." - Albert Einstein
>
>
>