raghu_apps
asked on
Wingrid cell text copying to another cell..but it comes with column names also.
HI,
I am using wingrid, and i diplayed a table information in that grid. In that when ever i selects one cell text..and then trying to copy that information into the another cell, it copied with Cell Column name also. I want only the cell text, not with column name.
e.Layout.Override.CellClic kAction = CellClickAction.CellSelect ;
i am using this property in Intialize row event.
And i am using Ctrl+c and Ctrl+v keyborad operations for copying and pasting. I am providng code for this..plz check this once..and give me advice.
Plz help on this.
I am using wingrid, and i diplayed a table information in that grid. In that when ever i selects one cell text..and then trying to copy that information into the another cell, it copied with Cell Column name also. I want only the cell text, not with column name.
e.Layout.Override.CellClic
i am using this property in Intialize row event.
And i am using Ctrl+c and Ctrl+v keyborad operations for copying and pasting. I am providng code for this..plz check this once..and give me advice.
Plz help on this.
private void FormulaGrid_KeyDown(object sender, KeyEventArgs e)
{
try
{
switch (e.KeyCode)
{
case Keys.C:
if (e.Control == true)
{
if (FormulaGrid.Selected.Cells.Count == 1)
{
System.Windows.Forms.Clipboard.SetText(this.FormulaGrid.Selected.Cells[0].Value.ToString());
}
}
break;
case Keys.V:
if (e.Control == true)
{
if (FormulaGrid.Selected.Cells.Count > 0)
{
foreach (Infragistics.Win.UltraWinGrid.UltraGridCell cell in this.FormulaGrid.Selected.Cells)
{
cell.Value = System.Windows.Forms.Clipboard.GetText();
}
}
}
break;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.