We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Celltype

In GGC ,i need a cell with Ellipse.When i click on it Open File should open ie one Browse btn should attch with data in that cell Give me a solution

2 Replies

ST stanleyj Syncfusion Team January 9, 2006 05:56 AM UTC

Hi, A custom CellType can be created with a model class and a renderer class. The model class creates the renderer class and the renderer class handles the UI requirements of the cell. This sample in Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\In Depth\CellButtons can be refered. After creating the custom celltype, it has to be registered through the CellModels.Add function this.gridGroupingControl1.TableModel.CellModels.Add("OpenFileDialog", new EllipsisCellModel(this.gridGroupingControl1.TableModel)); Then CellType "OpenFileDialog" can be used. The TableControlCellButtonClicked will be raised for the clicks on the GridCellButton. The OnClicked can also be overridden in the EllipsisCellButton class. Note 1. The namespace that is used is to be replaced instead of "forums." in the EllipsisCellButton class static EllipsisCellButton() { iconPainter = new GridIconPaint("forums.", typeof(EllipsisCellButton).Assembly); } 2. Make the image file an embedded resource under the Build Action. Best regards, Stanley


PR prethi January 9, 2006 06:43 AM UTC

Thanks .Its working >Hi, > >A custom CellType can be created with a model class and a renderer class. The model class creates the renderer class and the renderer class handles the UI requirements of the cell. This sample in Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\In Depth\CellButtons can be refered. > >After creating the custom celltype, it has to be registered through the CellModels.Add function > >this.gridGroupingControl1.TableModel.CellModels.Add("OpenFileDialog", new EllipsisCellModel(this.gridGroupingControl1.TableModel)); > >Then CellType "OpenFileDialog" can be used. > >The TableControlCellButtonClicked will be raised for the clicks on the GridCellButton. The OnClicked can also be overridden in the EllipsisCellButton class. > > >Note > >1. The namespace that is used is to be replaced instead of "forums." in the EllipsisCellButton class > > static EllipsisCellButton() > { > iconPainter = new GridIconPaint("forums.", typeof(EllipsisCellButton).Assembly); > } > >2. Make the image file an embedded resource under the Build Action. > >Best regards, >Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon