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.

Reg Copy Past Property

Thread ID:

Created:

Updated:

Platform:

Replies:

30745 Jun 23,2005 01:28 AM Jun 23,2005 07:49 AM Windows Forms 3
loading
Tags: GridControl
Anna Srinivasan
Asked On June 23, 2005 01:28 AM

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

Administrator [Syncfusion]
Replied On June 23, 2005 05:27 AM

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

Anna Srinivasan
Replied On June 23, 2005 07:43 AM

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.

Administrator [Syncfusion]
Replied On June 23, 2005 07:49 AM

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).

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.

;