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

tooltip is not displaying

3 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gajanan
Top achievements
Rank 2
Gajanan asked on 29 Sep 2010, 09:49 AM
hello All

i have updated my application with new version of telerik controls. in my Application i have 1 radgrid,but my problem is that
in radgrid there is multiple columns somes are showing and some are visible false,in my grid there is one column i.e. Display name in that for each row i am displaying tooltip i.e my one of the grid column but it is visible false.
i am using the following code on Radgrid_ItemDataBound

//Set tool tip
        if (e.Item is GridDataItem)
        {
            GridDataItem gridItem = e.Item as GridDataItem;
            foreach (GridColumn column in RadGrid_PurchaseOrderDetail.MasterTableView.RenderColumns)
            {
                if (column is GridBoundColumn)
                {
                    gridItem["PartItems"].ToolTip = gridItem["SKUNumber"].Text;
                    gridItem["Price"].ToolTip = gridItem["StandardCost"].Text;
                }
            }
        }

but i am getting value of gridItem["SKUNumber"].Text this is '&nbsp'

plz tell the solution how to display tooltip (value of another radgrid boundcolumn)for radgrid bound column.

thank you...

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 29 Sep 2010, 11:26 AM
Hello Gajanan,

I have tried the similar scenario and it is working for me. Check whether your field 'SKUNumber' is null or you have bind that field to the grid data source.  And here is the code that I tried.

ASPX:
<telerik:GridBoundColumn DataField="FirstName" UniqueName="FirstName" HeaderText="FirstName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="user_role" UniqueName="user_role" HeaderText="user_role"
    Visible="false">
</telerik:GridBoundColumn>

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
     if (e.Item is GridDataItem)
       {
           GridDataItem item = (GridDataItem)e.Item;
           foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
           {
               if (column is GridBoundColumn)
                   item["FirstName"].ToolTip = item["user_role"].Text;
           }
        }
   }

Thanks,
Princy.

0
Tiago
Top achievements
Rank 1
answered on 07 Jan 2014, 07:23 PM
Hello,

I have a similar code that was working.

ASPX:
<telerik:GridBoundColumn DataField="txt_ponto" HeaderText="Descrição" ReadOnly="True"
    UniqueName="txt_ponto" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="cd_ponto" HeaderText="Ponto" ReadOnly="True"
    UniqueName="cd_ponto" Visible="true">
</telerik:GridBoundColumn>

VB:
Protected Sub gridRelCompAnalog_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles gridRelCompAnalog.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
        Dim dataBoundItem As GridDataItem = e.Item
        dataBoundItem.ToolTip = dataBoundItem("txt_ponto").Text
    End If
End Sub

I've just updated my application with the latest version of Telerik controls and now I'm getting '&nbsp' for dataBoundItem("txt_ponto").Text.
Any ideas how to make the tooltip works again?


Thanks,
Tiago
0
Princy
Top achievements
Rank 1
answered on 08 Jan 2014, 03:53 AM
Hi Tiago,

If you want to hide a column and access it, please set Display="false". When you set Visible=false, you cant access the txt_ponto in the serverside.

ASPX:
<telerik:GridBoundColumn DataField="txt_ponto" HeaderText="Descrição" ReadOnly="True"
    UniqueName="txt_ponto" Display="false">
</telerik:GridBoundColumn>

Thanks,
Princy
Tags
Grid
Asked by
Gajanan
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 1
Tiago
Top achievements
Rank 1
Share this question
or