Completed
Last Updated: 05 Sep 2012 14:31 by Jesse Dyck
ADMIN
Stefan
Created on: 05 Sep 2012 07:18
Category: GridView
Type: Bug Report
4
FIX. RadGridView - unable to set image of the button in command cell in CellFormatting
The column image setting overrides the local image setting. 

Work around:
void grid_CellFormatting(object sender, CellFormattingEventArgs e)
       {
           if (e.CellElement is GridCommandCellElement)
           {
               if (e.Column.Name == "stationview")
               {
                   RadButtonElement element = (RadButtonElement)e.CellElement.Children[0];
                   element.UnbindProperty(RadButtonElement.ImageProperty);
                   element.Image = img;
                   element.DisplayStyle = DisplayStyle.Image;
                   element.ImageAlignment = ContentAlignment.MiddleCenter;
               }
           }
       }
1 comment
Jesse Dyck
Posted on: 05 Sep 2012 14:31
The work around is sufficent.  If it is properly documented, I don't believe any additional changes are necessary.  It would be nice to have this in the release notes though.

element.UnbindProperty(RadButtonElement.ImageProperty); for the win!