We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Mulitple questions on Use of Context Menu

Thread ID:





16047 Jul 5,2004 02:58 AM UTC Jul 5,2004 06:29 AM UTC WinForms 1
Tags: GridControl
Asked On July 5, 2004 02:58 AM UTC

Hai, I have several questions on the use of Context Menu on GridDataBoundGrid.They are, 1.How can i select multiple rows with the help of context menu and Control Key. 2.How can i delete the selected multiple rows with the button click event . Regards, Hsee.

Administrator [Syncfusion]
Replied On July 5, 2004 06:29 AM UTC

1) Try setting grid.ListBoxSelectionMode = SelectionMode.MultiSelect. This should allow your user to use the keyboard and mouse to select multiple rows. I am not sure what you mean by selecting rows with your context menu. Are you going to have a menu iten that says "Select rows 1-3"? If so, you can use grid.Selections.Add(GridRangeInfo.Rows(1,3)) to do this. 2) One way you can do this is to use SendKeys and forward a Delete key onto the grid from your button handler.
private void button1_Click(object sender, System.EventArgs e)
One comment is that the grid only deletes the active range. If you have several disjoint selections, the grid by default only deletes the active one. If you want to delete all on them, then you can try the technique in this KB. http://www.syncfusion.com/Support/article.aspx?id=10443


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon