Hi,
I am working on a .Net Winforms application.
I need to paint each cell of the datagrid depending upon some condition.
For this, I have added a new class called DGColoredTextboxColumn which inherits from the base class DataGridTextBoxColumn.
I have overridden the Paint method in my derived class
I am then adding this object to GridColumnStyles collection--->
tableStyle.GridColumnStyles.Add(colorTxtbox);
And finally, adding this tableStyle to TableStyles collection--->
dataGrid1.TableStyles.Add(tableStyle);
But the problem is that this overridden Paint method is never getting called.
Could pls let me know where am I going wrong....?
Thanks in advance....
Regards
livehed
I am working on a .Net Winforms application.
I need to paint each cell of the datagrid depending upon some condition.
For this, I have added a new class called DGColoredTextboxColumn which inherits from the base class DataGridTextBoxColumn.
I have overridden the Paint method in my derived class
I am then adding this object to GridColumnStyles collection--->
tableStyle.GridColumnStyles.Add(colorTxtbox);
And finally, adding this tableStyle to TableStyles collection--->
dataGrid1.TableStyles.Add(tableStyle);
But the problem is that this overridden Paint method is never getting called.
Could pls let me know where am I going wrong....?
Thanks in advance....
Regards
livehed