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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl selection and display issues.

Thread ID:

Created:

Updated:

Platform:

Replies:

69947 Nov 19,2007 10:01 PM UTC Nov 30,2007 10:56 PM UTC WinForms 7
loading
Tags: GridControl
Kiran Reddy
Asked On November 19, 2007 10:01 PM UTC

Hi,

I have a control derived from GridControl. I have set the ListBoxSelectionMode to
MultiSimple. I have some issues here:
- I am not able to select the rows using arrow keys and also by clicking and dragging the mouse holding the shift key.
- I have custom property to set the color of the selected row. I am setting this color in OnPreviewViewStyleInfo ovverride method. But this has no effect and the selection color is something othet than what I set.

PFA sample illustrating the issues. I am setting the Selection Color to Info where as it is displaying in some other color.

Essential Studio version: 4.4.0.51

I need to urgently fix these issues. Your help will be highly appreciated. Thanks.

Regards
Kiran


haneefm [Syncfusion]
Replied On November 19, 2007 10:53 PM UTC

Hi Kiran,

Issue1:

To extend the selection when the ArrowKey is pressed,you need to handle the CurrentCellKeyDown event of the grid and call MoveDown/MoveUp method. Here are the codes:

private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
if (this.gridControl1.ListBoxSelectionMode == SelectionMode.MultiSimple )
{
if( e.KeyCode == Keys.Down )
gridControl1.CurrentCell.MoveDown(1, true);
else
gridControl1.CurrentCell.MoveUp(1, true);
e.Handled = true;
}
}

Issue2:

You can use AlphaBlendSelectionColor property to change the selected row''s color. Please refer to the following code snippet.

[C#]

this.gridDataBoundGrid1.AlphaBlendSelectionColor = Color.Green;


Best regards,
Haneef


Kiran Reddy
Replied On November 20, 2007 10:28 AM UTC

Hi Haneef,

Can you modify the attached sample (in my previous mail)? I am not able to resolve issues with the changes you suggested. Thanks.

Regards
Kiran


haneefm [Syncfusion]
Replied On November 20, 2007 03:40 PM UTC

Hi Kiran,

Please refer to the attached sample for implementation and let me know if this helps.
GridRowSelection.zip

Best regards,
Haneef


Kiran Reddy
Replied On November 21, 2007 03:32 PM UTC

Hi Hannef,

I am able to set the selected color. But not selction using arrows. I have overriden the method OnCurrentCellKeyDown, but the method is not getting called at all.

Please let me know how to resolve this. Thanks.


Regards
Kiran



Kiran Reddy
Replied On November 21, 2007 03:32 PM UTC

Hi Hannef,

I am able to set the selected color. But not selction using arrows. I have overriden the method OnCurrentCellKeyDown, but the method is not getting called at all.

Please let me know how to resolve this. Thanks.


Regards
Kiran



Kiran Reddy
Replied On November 22, 2007 11:33 AM UTC

Hi,

Setting ListBoxSelectionMode to MultExtended doesn't give the intended functionality. The functionality I am looking for is:

- Click on an item, select that row. Clear all other selections.
- Shift + Click, select all the clicked items.
- Control + Click, select multiple ranges.

Kindly let me know how do I achieve this. Probably a smaple would help. Thanks.

Regards
Kiran





haneefm [Syncfusion]
Replied On November 30, 2007 10:56 PM UTC

Hi Kiran,

I am not sure of what be might be causing this strange behavior without a working sample. I have tested this issue in browser sample with Essentail studio V.4.x/5.x. But i was not able to reproduce the issue. Is it possible for you to upload us a minimal sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

Best regards,
Haneef


CONFIRMATION

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

or the page will be automatically redirected to 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

;