This is a migrated thread and some comments may be shown as answers.

[Solved] grey out images

1 Answer 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 29 Jun 2009, 08:18 AM
Hi,
Is it possible to grey out the edit and delete images in the grid?
I have this code to disable one button:
ImageButton delButton = gridItem["DeleteColumn"].Controls[0] as ImageButton; 
delButton.Enabled = false

But the image is still bright so users tries to click on it!

The same should happen if the grid is completely disabled:
RadGrid1.Enabled = false

Then everything is grey out except for the images. 

/Mattias

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 30 Jun 2009, 01:50 PM
Hello Mattias,

ImageButtons do not change their appearance when disabled. You have to apply additional styles. Here is a simple example:

HTML

<asp:ImageButton Enabled="false" CssClass="disabledImageButton" ImageUrl="..." />

CSS

.disabledImageButton
{
    opacity:0.3;
    filter:alpha(opacity=30);
}


All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Mattias
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or