<telerik:RadGrid runat="server" Height="150" ID="grdData" EnableEmbeddedSkins="false" OnSelectedIndexChanged="grdData_SelectedIndexChange" OnPreRender="grdData_PreRender"Skin="AS_Grid_Skin_V10" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="True" Width="100%" OnItemDataBound="grdData_ItemDataBound"> <ClientSettings EnablePostBackOnRowClick="true"> <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="false" /> <Selecting AllowRowSelect="true" /> </ClientSettings> <MasterTableView DataKeyNames="ID"> <Columns> <telerik:GridHyperLinkColumn HeaderText="<%$ Resources:GlobalTerms, lblName%>" DataTextField="Name" HeaderStyle-Wid
th="25%" DataNavigateUrlFields="Id" DataNavigateUrlFormatString="javascript:openScenarioDashboard('{0}');" UniqueName="Name" SortExpression="Name"/>I hide the default ExpandCollapseColumn and create my own custom column using GridExpandColumn. My customed column is called "btnExpandColumn".
I use following code to hide/show my custom column, but for some reason, it doesn't allow me to change the tooltip text.
I assume to change the tooltip text, I just need to use:
col.ToolTip = "My custom text";
Is it correct?
protected void rgPatientList_PreRender(object sender, EventArgs e)
{
foreach (GridColumn col in rgPatientList.MasterTableView.RenderColumns)
{
if (col.UniqueName == "ExpandColumn")
{
col.Display = false;
}
}
foreach (GridDataItem dataItem in rgPatientList.Items)
{
GridImageButton btn = (GridImageButton)dataItem["btnExpandColumn"].Controls[0];
if (!dataItem.Expanded)
{
btn.Visible = true;
}
else if (dataItem.Expanded)
{
btn.Visible=false;
}
}
}
userControl.FrameSource = SubPage.aspx;public RadNotification GetNotificationAlert(Control ctl){ var master = (defaultMaster)ctl.Page.Master; if (master != null) return master.FindControl("RadNotification1") as RadNotification; return null;}var notification = GetNotificationAlert(this);notification.VisibleTitlebar = false;notification.Width = 540;notification.Height = 90;notification.Opacity = 70;