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.
Unfortunately, activation email could not send to your email. Please try again.

changing button text at runtime in gdbg

Thread ID:





54791 Jan 17,2007 02:04 PM Jan 17,2007 03:50 PM Windows Forms 2
Tags: GridControl
Asked On January 17, 2007 02:04 PM

I have a GridDataBoundGrid gdbg with an unbound column of buttons (column 1). How can I change the text on the button at runtime? I have tried gdbg[i,1].Description = "NewText"; but this does not work.
Thanks for any suggestions.

Administrator [Syncfusion]
Replied On January 17, 2007 02:49 PM

Hi Ryan,

By default, DataBoundGrid doesn't store any style info properties. You can not set any cell or row specific properties for the DataBoundGrid other than the CellValue. You need to handle the PrepareViewStyleInfo (or Model.QueryCellInfo) Event to do this. Through this event you can set the style properties for the grid.

To set the Description for a cell, you check for the e.RowIndex/e.ColIndex, if that points to the row you desired, set the e.Style. Description for it.

See the KnowledgeBase Articles for more info.
QueryCellInfo event : http://www.syncfusion.com/Support/article.aspx?id=10351
PrepareViewStyleInfo event :http://www.syncfusion.com/Support/article.aspx?id=560

Please let me know if this helps.

Replied On January 17, 2007 03:50 PM

I added the QueryCellInfo event handler and that worked.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.