The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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
ASAnna 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.
ADAdministrator 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).