Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4165
Using a button in a column
posted

Hi.

I have a boolean column in a grid where i want to use a 'state' button Basically, if it is false, i am going to show one icon, and if true then i would show another Icon and have the button be disabled.

So far I set the style in the initgrid event:

c["isprinted"] = Style.Button

next, I set the image in cell appearence.

I imagine on the row init event I can set the right image.

The issue I am having is that it is showing a checkbox except when I mouse over ...then it shows the button. It is also displaying the 'false/true' text with the image..how can I make it image only?

Thanks.

Parents
No Data
Reply
  • 69832
    Offline posted

    I think what is happening is that the width of the column is insufficient to show both the checkbox and the state button, so when you mouse over the cell the button appears and takes up all available space so the checkbox isn't shown. I don't know what could be causing "true/false" to be shown because from what I remember those editor buttons don't display any text. In any case you can prevent the checkbox from appearing by either assigning an EditorWithText to the column's Editor property (thus preventing the CheckEditor from being used), or setting the column's Style property.

Children