Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2005

Tip: Looking for answers? Try searching our database.

DataGrid multi select

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne - 18 Aug 2005 18:27 GMT
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?

Signature

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

raj.singh@logicacmg.com - 19 Aug 2005 10:43 GMT
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
> 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?
[quoted text clipped - 10 lines]
> let him sit on a hot stove for a minute and it's longer than any hour.
> That's relativity." - Albert Einstein
Bjarke Lindberg - 19 Aug 2005 10:44 GMT
>  
> 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.
swashi - 19 Aug 2005 10:59 GMT
hi,
multi selection of rows can be prevented by setting datagrids
MultiSelect property to false

> 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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.