Grid to word

hi, wht is the problem in this code.actually i am trying to assign each individual grid cell colour to table individual cell in word document.plz help me.

row.Cells[j - 1].CellFormat.BackColor = Color.FromArgb(this.gridControl[i, j].BackColor.ToArgb());

1 Reply

SK Sarath Kumar G Syncfusion Team July 21, 2007 02:51 AM UTC


Hi Sravan,

Thank you for your interest in Syncfusion products.

I am afraid I am unable to reproduce the issue. I was able to set the backcolor of gridcontrol to the backcolor of the table generated in the word document. I created a datatable with two rows and two columns. I applied the backcolor of the gridcontrol to the column of the datatable and I was able to apply the backcolor.This can be achived by using the following code snippet;


[C#]

row_0.Cells[0].CellFormat.BackColor = Color.FromArgb(this.gridControl1[1, 1].BackColor.ToArgb());



Here is the sample for your reference.

http://websamples.syncfusion.com/samples/DocIo.Windows/F-64389/main.htm

Please let me know for further help.

Regards,
Sarath

Loader.
Up arrow icon