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

RadGrid ToolTip Shows   After Postback

2 Answers 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 19 Dec 2013, 07:47 PM
I have a RadGrid control in which I want to display a ToolTip for certain columns which contain information from the same data row in the data table.  I'm getting the results I expect on the first load of the RadGrid.  However, if I push a button which does a postback and databinds the RadGrid to the new SQL, I only get $nbsp; as the tooltip.  I've searched and can not find the answer.  Please help.

ASPX  (It does become visible in the button push).
<telerik:RadGrid ID="radgrid1" runat="server" Visible="False" MasterTableView-EnableNoRecordsTemplate="true" DataSourceID=""
    AllowPaging="True" PageSize="20" OnItemDataBound="radgrid1_ItemDataBound">
    <MasterTableView></MasterTableView>
</telerik:RadGrid>


This is the code within radgrid1_ItemDataBound which does provide the correct results the first rendering of the RadGrid.
If (TypeOf e.Item Is GridDataItem) Then
    Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
    dataItem("SSN4").ToolTip = dataItem("SSN").Text
    dataItem("Client").ToolTip = dataItem("Description").Text
    dataItem("Status").ToolTip = "Change date: " & dataItem("StatusChangeDate").Text
End If

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Dec 2013, 04:42 AM
Hi Jack,

I tried a similar scenario and the code works fine at my end. Make sure that you are binding the RadGrid using Advanced Data-binding (using NeedDataSource event). Please provide your full code snippet if this doesn't help.

Thanks,
Princy
0
Doug
Top achievements
Rank 1
answered on 20 Dec 2013, 03:24 PM
Thanks for the reply.  I tried that and it didn't seem to make a difference.  I believe the issue I was having had to do with hiding the three columns during the grid prerender from the data source which were visible in the tooltip.  I turned off AutoGenerateColumns and added each column to the MasterTableView and then disabled ViewStateMode.  Now it works as expected.
Tags
Grid
Asked by
Doug
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Doug
Top achievements
Rank 1
Share this question
or