Custom renderer


I am trying to attach a custom renderer to the first column in a hierarchical grid.

I cannot get the renderer to be attached to the column if I have "ShowTreeLines" set to true - I always get the standard GridDataBoundTreeCellRenderer instead (my renderer is derived from this one).

How can I do this.....

Thanks

Stuart

3 Replies

AD Administrator Syncfusion Team January 29, 2007 07:00 PM UTC

Hi Stuart,

We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

Best Regards,
Haneef


SG Stuart Grimsell January 30, 2007 12:37 PM UTC


Haneef,

Attached is a zipped project that shows the problem ( I think ).

Toggle the check box to set whether the grid is showing tree lines - my renderer paints everything a rather fetching violet.

Thanks,

Stuart

Renderer.zip


AD Administrator Syncfusion Team February 1, 2007 12:31 AM UTC

Hi Stuart,

Do you want to replace the DataBoundTreeCell with your FunkyDrawCell in a grid? If so, you should remove the databound treecell from the cellmodel and add your FunkyDrawCell to cellmodel. Here is a code snippet to show this.

FunkyDrawModel parp = new FunkyDrawModel( gridDataBoundGrid1.Model );
//gridDataBoundGrid1.Model.CellModels.Add("FunkyDraw", parp );
gridDataBoundGrid1.Model.CellModels.Remove("DataBoundTreeCell");
gridDataBoundGrid1.Model.CellModels.Add("DataBoundTreeCell", parp );

Here is a modified sample.
Renderer.zip

Best Regards,
Haneef

Loader.
Up arrow icon