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

Reg Copy Past Property

Hi, I am using gridGroupingControl.In this control some columns are editable and some columns are non editable. I am using following event for selecting all records in the grid.[Ctrl+A] private void gridGroupingControl1_TableControlCurrentCellControlKeyMessage(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellControlKeyMessageEventArgs e) { Keys keyCode = (Keys) ((int)e.Inner.Msg.WParam) & Keys.KeyCode; if(keyCode == Keys.A && e.Inner.Msg.Msg == 0x100 //WM_KEYDOWN && 0 != (Control.ModifierKeys & Keys.Control)) { //ctl+A pressed this.gridGroupingControl1.BeginUpdate(); foreach(GridRecord rec in gridGroupingControl1.Table.Records) { if(!rec.IsSelected()) rec.SetSelected(true); } this.gridGroupingControl1.EndUpdate(true); e.Inner.Handled = true; e.Inner.Result = true; this.gridGroupingControl1.TableOptions.SelectionBackColor = Color.Black; } } For above event i need to give focus to editable field then only above event get fired and i can able to select records. Q1: If focus is editable field i can able to do Ctrl+A, In this if i press Ctrl+c only editable cell get copied. How do i copy all selected records..? Q1: If focus is noneditable field, How do i use Ctrl+A..? Thanks, Anna

3 Replies

AD Administrator Syncfusion Team June 23, 2005 09:27 AM UTC

You can handle the TableControlKeyDown event to catch the ctlA on a none editing cell. To copy things currently in a GridGridControl, you have to catch TableControl.Model.ClipboardCopy and do the copy there yourself. Here is a sample showing both things. http://www.syncfusion.com/Support/user/uploads/GridGroupingControl_750433e.zip


AS Anna Srinivasan June 23, 2005 11:43 AM UTC

Hi, This code is working fine. Q1:I need blinking cursor even if it is non editable field then only i am able to do Ctrl+c option.


AD Administrator Syncfusion Team June 23, 2005 11:49 AM UTC

I do not understand. How do I see this problem in the sample? It seems to work whether or not there is a blinking cursor (as long as the grid has focus).

Loader.
Live Chat Icon For mobile
Up arrow icon