JJ
Jisha Joy
Syncfusion Team
May 19, 2008 06:33 AM UTC
Hi Vikas,
This can be achieved by getting the selected ranges by using GetSelectedRows method and iterate through GridRangeInfoList.
Please refer the code:
private void button1_Click(object sender, EventArgs e)
{
GridRangeInfoList rangeList = this.gridControl1.Selections.GetSelectedRows(true, false);
if (rangeList.Count > 0)
{
foreach (GridRangeInfo range in rangeList)
{
for (int row = range.Top; row <= range.Bottom; row++)
{
for (int col = 1; col <= gridControl1.ColCount; col++)
{
this.gridControl2[row, col].CellValue = this.gridControl1[row, col].CellValue;
}
}
}
}
}
Please let me know if this helps.
Regards,
Jisha