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

[Solved] Tooltip for the checkbox inside the Grid

1 Answer 275 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Krishna
Top achievements
Rank 1
Krishna asked on 12 May 2008, 06:57 AM
Hi,

In my Rad Grid in the first template column of the header template I have two checkbox controls one checkbox is to select all the Rows in Grid and the another one is to deselect all the checkbox checked.My issue is I want to display the tooltip for the two checkboxes differently.So anyone could plz guide me to get the tooltip for the control checkbox inside the Radgrid header template column.I have checked the properties of the checkbox also but the tooltip property is not there.Plz give a solution to this ASP.

Thanks,
Krishna Kumar.A

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 May 2008, 07:09 AM
Hi Krishna,

Try the following code snippet to achieve the desired scenario.

ASPX:
<telerik:GridTemplateColumn UniqueName="ProductName" DataField="ProductName"  HeaderText="ProductName"  > 
                        <HeaderTemplate> 
                            <asp:CheckBox ID="CheckBox1" runat="server" /> 
                            <asp:CheckBox ID="CheckBox2" runat="server" /> 
                        </HeaderTemplate> 
            </telerik:GridTemplateColumn> 

CS:
 protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
          
    {  
        if (e.Item is GridHeaderItem)  
        {  
            GridHeaderItem header = (GridHeaderItem)e.Item;  
            CheckBox chkbx1 = (CheckBox)header["ProductName"].FindControl("CheckBox1");  
            chkbx1.ToolTip = "Select";  
 
            CheckBox chkbx2 = (CheckBox)header["ProductName"].FindControl("CheckBox2");  
            chkbx2.ToolTip = "Deselect";  
 
        }  
   } 


Thanks
Princy.
Tags
Grid
Asked by
Krishna
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or