grid

Hallo,
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

4 Replies

OC Ochieng January 15, 2013 03:32 PM UTC

im end effect how to create push buttons in web grid grouping control.


BM Bala Murugan A.S Syncfusion Team January 18, 2013 10:24 AM UTC

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



OC Ochieng January 21, 2013 08:10 AM UTC

Hallo Murugan,
thanks. That will work fine



BM Bala Murugan A.S Syncfusion Team January 22, 2013 12:31 PM UTC

Hi Ochieng,

Thanks for your update.

Please contact us if you have any other concerns or queries.

Regards,
Bala Murugan A.S

Loader.
Up arrow icon