This is a migrated thread and some comments may be shown as answers.
RadGrid tooltip refresh no working
3 Answers 6 Views
This is a migrated thread and some comments may be shown as answers.
Laimis
Top achievements
Rank 1
Laimis asked on 09 Jul 2017, 10:43 PM

I have very simple RadGrid that is being loaded from database

 <telerik:RadGrid ID="RadGrid1" runat="server" Skin="MetroTouch"  OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" ></telerik:RadGrid>

 

This populates my tooltip:

 protected void RadGrid1_PreRender(object sender, EventArgs e)
        {

foreach (GridDataItem dataItem in radgrid2.MasterTableView.Items)
            {
                dataItem["Offset_Rank"].ToolTip = dataItem["OffsetToolTip"].Text;
            }
        }

 

My problem is, once I change my lookup parameters and reload the radGrid my tool tip becomes null,  what am I missing?

 

Any help would be helpful.

Thanks

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 12 Jul 2017, 07:26 AM
Hi Laimis,

Please verify that after this change the dataItem["OffsetToolTip"].Text value is properly accessed. Alternatively, you can try to achieve this requirement using ItemDataBound event handler:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-raw-field-data-and-key-values

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Laimis
Top achievements
Rank 1
answered on 13 Jul 2017, 05:59 PM
thanks for the reply,  one more question, my code works fine and the tooltip shows the value after the page load and also after the radgrid refresh, but it breaks if I hide the column OffsetToolTip (which populates the tooltip), but it only breaks after I refresh the data in ragrid, the initial load works.
0
Marin Bratanov
Telerik team
answered on 18 Jul 2017, 03:03 PM

Hi Laimis,

When the column is Visible=false, its data is not available, and this is expected.

One way of working around that is to add the OffsetToolTip field to the DataKeyNames collection of the TableView and use item.GetDataKeyValue("OffsetToolTip") to access it.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Laimis
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Laimis
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or