Hi All
Is there a property to set the text of the button inside a cell?
Thanks in advance
Abhishek
Hi,
Setting the cell's Value will not work for EditButton style, only for Button style. They are not the same.
If you want an edit button in a cell with text on it, then you will need to use an editor. For a normal text cell, what you do is place an UltraTextEditor on the form. Use the ButtonsRight collection to add a button and set to the Text on that button. Then attach the UltraTextEditor to the grid column via the EditorComponent property on the column.
To handle the button clicks, you trap the EditorButtonClick event on the UltraTextEditor. e.Context in the event args will give you the UltraGridCell that was clicked.
Thanks for reply.
Yes i am using Cell Style as EditButton, will try the above mentioned approach, and will update in case further assistance require.
Hello Abhishek,
If you are using a Button style of the desired column, the mentioned approach should work for you.
If you are referring to something else, I would need more specific information what exactly button you are using inside the cell, in order to be able to assist you further with your requirements.
Please feel free to let us know if you have any other questions.
Hi there,
Do you mean setting the text during runtime or just once?
Normally you would set the text of the button in the grid's InitializeRow event. Something like the following:
e.Row.Cells["Button"].Value = "Your button text!";