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

tooltip to the expand collaps button

1 Answer 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 27 Nov 2012, 06:56 AM
How to give my own tooltip to the expand colapse button of my radgrid?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Nov 2012, 07:14 AM
Hi,

Try the following code snippet to give different ToolTip for ExpandCollapse Button while expanding and collapsing.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
    {
        Button expandcollapsebtn = (Button)item["ExpandColumn"].Controls[0];
        if (item.Expanded)
        {           
                expandcollapsebtn.ToolTip = "Collapse ToolTip";
        }
        else
                expandcollapsebtn.ToolTip = "Expand ToolTip";
     }
}

Thanks,
Shinu.
Tags
Grid
Asked by
beeta one
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or