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
770
Tooltip to cell in XamwebGrid
posted

Hi,

I need to set tooltip to cell on Mouse over event in XamWebGrid.

Please can u tell me right way ?

Thanks

Nandkishor .

Parents
No Data
Reply
  • 40030
    Suggested Answer
    Offline posted

    Hi Nandkishor, 

    This is a feature that we're currently looking to add to the xamWebGrid in a future release. However, until then, you can handle the Grid's CellControlAttached event, and use the ToolTipService attached property to add a tooltip to a  cell. 

    Note: if you take this approach, it is every important, to set the Tooltip to null, for cells you aren't adding a tooltip to, as CellControl's get recycled, which means if you don't clear out the value, it could display a dead value. 

    void DataGrid1_CellControlAttached(object sender, CellControlAttachedEventArgs e)

                {

                      if(e.Cell.Column.Key == "Title")

                            ToolTipService.SetToolTip(e.Cell.Control, e.Cell.Row.Data);

                      else

                            ToolTipService.SetToolTip(e.Cell.Control, null);

                }

    Hope this helps, 

    -SteveZ

Children