Tuesday, June 16, 2015

Set the ToolTip for a DevExpress ASPxButton on the C# side.

MyButton.ToolTip = "Whatever";

 
 

This is a lot better than wiring up something on the jQuery side to set the title parameter inside of an html tag like so:

$('.dxb').live('mouseover', function () {
   var child = $(this)[0].children[0];
   var attribute = $(child).attr("saveddisabledstateitemcolor");
   if (attribute) {
      $(this).attr("title", $("#MyResourceBubblesUpHere").val());
   }
});

 
 

...especially so as that dxb class may change out from under you when you upgrade DevExpress. Even if the control wasn't a DevExpress control or even if it was, you can always just set an attribute for the title inline parameter too from C#.

No comments:

Post a Comment