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

GridPushButtonCell Text in bound grid

How can i set the text of a pushbutton column in a bound grid? Actually, it is a bound column, and I expected the text value to appear on the button, but seems to me it just drawn over it.

1 Reply

AD Administrator Syncfusion Team March 12, 2003 08:54 AM UTC

The text displayed in a PushButton cell is the GridStyleInfo.Description property. In a databound grid, the values from the datasource go into the GridStyleInfo.Text property, and so this is why you don't see the datasource value on the PushButton. If you want to see this, handle the PrepareViewStyleInfo event, and if e.Style.CellType equals "PushButton", then set e.Style.Description equal to e.Style.Text.

Loader.
Live Chat Icon For mobile
Up arrow icon