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

How do i assign text for PushButton in griddataboundgrid in a single column cells

I have a GridDataBoundGrid With the Columns Item_Id, Item_Name, Item_Price,Item_Edit, Item_Delete columns. Edit and Delete columns are PushButtons, But I am not able to assign text for that pushbutton, Is It possible to do or not??

I tried this code...

 private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
        {
            if (e.ColIndex == 3 && e.RowIndex > 0)
            {
                e.Style.CellType = "PushButton";               
                e.Style.Text = "Edit Button";
                e.Style.CellAppearance = Syncfusion.Windows.Forms.Grid.GridCellAppearance.Raised;                
            }

            if (e.ColIndex == 4 && e.RowIndex > 0)
            {
                e.Style.Text = "Delete Button";
                e.Style.CellType = "PushButton";                
                e.Style.CellAppearance = Syncfusion.Windows.Forms.Grid.GridCellAppearance.Raised;                
            }
        }
Thanks in Advance....

2 Replies

NA Narry June 7, 2014 04:28 AM UTC

Oops... Sorry and Thanks and I just finished it.....


MK Muthukumar Kalyanasundaram Syncfusion Team June 9, 2014 08:47 AM UTC

Hi Narry,

Thanks for your interest in Syncfusion products.
Please let us know if you require any assistance.

Regards,
Muthukumar K

Loader.
Live Chat Icon For mobile
Up arrow icon