grid
- Jan 15, 2013 09:15 AM UTC
- Jan 22, 2013 12:31 PM UTC
i am working on a grid and need to have customized buttons within the grid. In Windows form there is the function
public virtual void DrawButton(Graphics g, Rectangle rect, ButtonState buttonState, GridStyleInfo style)
and i was wondering if there is a version for the web grid grouping control.
Thank you
Hi Ochieng,
We have an option to change cell type in grid grouping control using CellType property. We suggest you to set CellType as 'PustButton' to achieve your requirement. Please refer the below code snippets.
In Design Time:
<syncfusion:GridColumnDescriptor HeaderText="TempColumn" MappingName="TempColumn">
<Appearance>
<AnyRecordFieldCell CellType="PushButton" />
</Appearance>
</syncfusion:GridColumnDescriptor>
Using QueryCellStyleInfo ( Changing CellType dynamically):
this.ggc1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(ggc1_QueryCellStyleInfo);
void ggc1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
if (e.TableCellIdentity.Column.MappingName == "TempColumn")
{
e.Style.CellType = "PushButton";
}
}
}
Here is the documentation link: http://help.syncfusion.com/ug/asp.net/grid/Documents/excellikeedit.htm
We have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.
Demo sample: CellType.zip
Please let us know if you have any concerns.
Regards,
Bala Murugan A.S
thanks. That will work fine
Thanks for your update.
Please contact us if you have any other concerns or queries.
Regards,
Bala Murugan A.S
- 4 Replies
- 2 Participants
-
OC Ochieng
- Jan 15, 2013 09:15 AM UTC
- Jan 22, 2013 12:31 PM UTC