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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

changing button text at runtime in gdbg

Thread ID:

Created:

Updated:

Platform:

Replies:

54791 Jan 17,2007 07:04 PM UTC Jan 17,2007 08:50 PM UTC WinForms 2
loading
Tags: GridControl
Ryan
Asked On January 17, 2007 07:04 PM UTC

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 07:49 PM UTC

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.
Regards,
Haneef

Ryan
Replied On January 17, 2007 08:50 PM UTC

I added the QueryCellInfo event handler and that worked.
Thanks.

CONFIRMATION

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.

Warning Icon 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.Close Icon

;