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.
Unfortunately, activation email could not send to your email. Please try again.

GridListControl - issues with down Arrow key

Thread ID:

Created:

Updated:

Platform:

Replies:

40104 Jan 25,2006 10:15 AM Feb 2,2006 07:24 AM Windows Forms 11
loading
Tags: GridControl
Badri Rajani Kanth
Asked On January 25, 2006 10:15 AM

Hi, I am working with gridListControl which is customized as a list box. When any item is selected in gridListControl, i have two problems with pressing down arrow key. 1. click an item in gridListControl. It will select the item by hiliging the row(column) as blue. 1. now press down arrow key. Item just below the selected item is just bordered(with dots) as if it is also selected. Instead, i want this also to be selected. 2. now press ctrl + down arrow. Last item of the list is just bordered(with dots) as if it is also selected. I want one item below the clicked item to be selected. Rgds Rajani Kanth

Badri Rajani Kanth
Replied On January 26, 2006 10:09 AM

Any input plz.. ----------- >Hi, > >I am working with gridListControl which is customized as a list box. >When any item is selected in gridListControl, i have two problems with pressing down arrow key. > >1. click an item in gridListControl. It will select the item by hiliging the row(column) as blue. > >1. now press down arrow key. Item just below the selected item is just bordered(with dots) as if it is also selected. Instead, i want this also to be selected. > >2. now press ctrl + down arrow. Last item of the list is just bordered(with dots) as if it is also selected. I want one item below the clicked item to be selected. > >Rgds >Rajani Kanth

Administrator [Syncfusion]
Replied On January 26, 2006 10:26 PM

Hi Badri, I don''t see that problem with the regular GridListControl so I assume part of your customizations cause the problem. Can you post the code or a sample that lets us see the problem? Thanks, Stefan >Hi, > >I am working with gridListControl which is customized as a list box. >When any item is selected in gridListControl, i have two problems with pressing down arrow key. > >1. click an item in gridListControl. It will select the item by hiliging the row(column) as blue. > >1. now press down arrow key. Item just below the selected item is just bordered(with dots) as if it is also selected. Instead, i want this also to be selected. > >2. now press ctrl + down arrow. Last item of the list is just bordered(with dots) as if it is also selected. I want one item below the clicked item to be selected. > >Rgds >Rajani Kanth

Badri Rajani Kanth
Replied On January 30, 2006 05:30 AM

Hi Stefen, Not only in my code. Plz check in ..\Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Quick Start\GridListControlSample Run the sample. Select Mutliple Selectetion\Extended Mutliple Selectetion in the list type. Select a row, press down arrow /Ctrl + down arrow. You can see the problem. Rgds Rajani Kanth >Hi Badri, > >I don''t see that problem with the regular GridListControl so I assume part of your customizations cause the problem. > >Can you post the code or a sample that lets us see the problem? > >Thanks, >Stefan > >>Hi, >> >>I am working with gridListControl which is customized as a list box. >>When any item is selected in gridListControl, i have two problems with pressing down arrow key. >> >>1. click an item in gridListControl. It will select the item by hiliging the row(column) as blue. >> >>1. now press down arrow key. Item just below the selected item is just bordered(with dots) as if it is also selected. Instead, i want this also to be selected. >> >>2. now press ctrl + down arrow. Last item of the list is just bordered(with dots) as if it is also selected. I want one item below the clicked item to be selected. >> >>Rgds >>Rajani Kanth

stanleyj [Syncfusion]
Replied On January 30, 2006 07:23 AM

Hi Badri, See if this helps. this.gridListControl1.Grid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo); GridCurrentCell cc; private void Grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { cc = this.gridListControl1.Grid.CurrentCell; if(cc.HasCurrentCellAt(e.RowIndex)) { e.Style.BackColor = SystemColors.Highlight; } } Best regards, Stanley

Badri Rajani Kanth
Replied On January 30, 2006 11:13 AM

Thank you Stanley, One part of problem is resolved. Still Ctrl+ downarrow/uparrow is not selecting the prev/next rows. Instead of going to last/first rows. I am trying for this. Rgds Rajani Kanth

stanleyj [Syncfusion]
Replied On January 31, 2006 01:30 AM

Hi Rajani, You can use the Shift + downarrow/uparrow for selecting the next/previous rows. Best regards, Stanley

Badri Rajani Kanth
Replied On January 31, 2006 04:26 AM

Yes, Ctrl+ downarrow/uparrow behaviour should be consistant with windows list box controls. Rgds Rajani Kanth >Hi Rajani, > >You can use the Shift + downarrow/uparrow for selecting the next/previous rows. > >Best regards, >Stanley

stanleyj [Syncfusion]
Replied On January 31, 2006 05:28 AM

Hi Rajani, Can you help me to understand this behavior in the ListBox, to me either Ctrl+ downarrow/uparrow or Shift + downarrow/uparrow or downarrow/uparrow, all works the same ( navigating to next/previous rows). However for a GridListControl, Ctrl+ downarrow/uparrow is designed to move to last/first rows and Shift + downarrow/uparrow for selecting the next/previous rows. Thanks, Stanley

Badri Rajani Kanth
Replied On February 1, 2006 01:16 PM

Hi Stanely, I am using GrdListControl as a multi-select, single columned listcontrol. So, I want Ctrl + Down/Up arrows move to next/prev rows only. Anyhow, I am using below code to achieve this. ------------------------------------------------- private int mVal = 0; private void gridListControl1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if ((e.KeyCode == Keys.Down) && (Control.ModifierKeys & Keys.Control) != 0) { mVal = 1; } else if ((e.KeyCode == Keys.Up) && (Control.ModifierKeys & Keys.Control) != 0) { mVal = -1; } else { mVal = 0; } } private void Grid_MoveCurrentCellDirection(object sender, GridMoveCurrentCellDirectionEventArgs e) { if(mVal != 0) { e.Result = false; e.Handled = true; int index = gridListControl1.SelectedIndex + mVal; gridListControl1.ClearSelected(); gridListControl1.SetSelected( index, true); mVal = 0; } } ------------------------------------------------- Please inform me if the same can also be done by setting any properties. Otherwise also it is working fine. Rgds Rajani Kanth

stanleyj [Syncfusion]
Replied On February 2, 2006 12:58 AM

Hi Rajani, No, there are no property settings to do these, the code looks good. I put a little change in the MoveCurrentCellDirection handler. Please check and imply if you need. int index = gridListControl1.SelectedIndex + mVal; gridListControl1.SetSelected( index, true); gridListControl1.ClearSelected(); After Ctrl + arrow keys, then if shift + arrow keys are start, the selection was from where the Ctrl + arrow key started. The code above seems to correct it. Best regards, Stanley

Badri Rajani Kanth
Replied On February 2, 2006 07:24 AM

Cool..That''s great stanely! Rajani Kanth

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.

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.

;