Ctrl + A
Hi,
I am wondering how to intercept the event when user pressed Ctrl + A to select all, and customized the event to exclude column, row headers and any hidden columns?
Thanks,
Q
I am wondering how to intercept the event when user pressed Ctrl + A to select all, and customized the event to exclude column, row headers and any hidden columns?
Thanks,
Q
SIGN IN To post a reply.
4 Replies
JO
Johnson
Syncfusion Team
April 18, 2008 09:27 PM UTC
Hi Q,
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
QS
Qingde Shi
May 8, 2008 02:32 PM UTC
Hi Johnson,
Thanks.
I can not open the link below. Could you please check if the link is still valid?
in addtion, in virtual mode, when pressing Ctrl + A, you can see that cell being selected one by one, row by row. it is a bit slow. I am guessing this resulted from when selecting one cell, it causes the grid to refresh and query cell events, so when selecting all, every cell causes at least one round refreshing. Is this understanding correct? if so, how to avoid? if not, what might be the reason for such behavior?
Thanks,
Q
>Hi Q,
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
Thanks.
I can not open the link below. Could you please check if the link is still valid?
in addtion, in virtual mode, when pressing Ctrl + A, you can see that cell being selected one by one, row by row. it is a bit slow. I am guessing this resulted from when selecting one cell, it causes the grid to refresh and query cell events, so when selecting all, every cell causes at least one round refreshing. Is this understanding correct? if so, how to avoid? if not, what might be the reason for such behavior?
Thanks,
Q
>Hi Q,
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
QS
Qingde Shi
May 13, 2008 05:45 PM UTC
Hi,
I am still trying to get some answers on this subject.
Thanks.
Q
>Hi Johnson,
Thanks.
I can not open the link below. Could you please check if the link is still valid?
in addtion, in virtual mode, when pressing Ctrl + A, you can see that cell being selected one by one, row by row. it is a bit slow. I am guessing this resulted from when selecting one cell, it causes the grid to refresh and query cell events, so when selecting all, every cell causes at least one round refreshing. Is this understanding correct? if so, how to avoid? if not, what might be the reason for such behavior?
Thanks,
Q
>Hi Q,
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
I am still trying to get some answers on this subject.
Thanks.
Q
>Hi Johnson,
Thanks.
I can not open the link below. Could you please check if the link is still valid?
in addtion, in virtual mode, when pressing Ctrl + A, you can see that cell being selected one by one, row by row. it is a bit slow. I am guessing this resulted from when selecting one cell, it causes the grid to refresh and query cell events, so when selecting all, every cell causes at least one round refreshing. Is this understanding correct? if so, how to avoid? if not, what might be the reason for such behavior?
Thanks,
Q
>Hi Q,
To copy a Grid without Row header and column header when Press Ctrl+A and Ctrl+C, you need to set the below properties.
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.ColHeader;
this.gridControl1.CutPaste.ClipboardFlags &= ~GridDragDropFlags.RowHeader;
Below minimal sample shows how to copy a Grid without hidden columns. Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F73001/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson
SR
Sri Rajan
Syncfusion Team
June 4, 2008 09:26 AM UTC
Hi Q,
Thank you for your patience.
Please try the code below to select all the cells in a GridControl or a virtual Grid except row and column headers.
Please let me know if this helps.
Best Regards,
Srirajan
Thank you for your patience.
Please try the code below to select all the cells in a GridControl or a virtual Grid except row and column headers.
void gridControl1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.A && e.Control)
{
int rc = this.gridControl1.Model.RowCount;
int cc = this.gridControl1.Model.ColCount;
this.gridControl1.Model.Selections.Add(GridRangeInfo.Cells(1, 1, rc, cc));
}
}
Please let me know if this helps.
Best Regards,
Srirajan
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
QS Qingde Shi
- Apr 15, 2008 04:56 PM UTC
- Jun 4, 2008 09:26 AM UTC