Hi,
I am learning the RADGrid control. The following code of page 459 does not work:
First, there's a problem with the namespace. There is a squiggly line under the namespace explained as follows:
"Namespace or type specified in the Imports 'Telerik,WebControls' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public memeber. Make sure the imported element name doesn't use any aliases."
So I guess that means that 'WebControls' is not a member of Telerik?
Next, Type 'GridHeaderItem' is not defined.
I deleted the 'Telerik.WebControls' namespace and used the 'Telerik.Web.UI' namespace. I revised the code to:
The application ran, but I can not see the Tool tips. Is there a correction written somewhere for this?
Thanks!
I am learning the RADGrid control. The following code of page 459 does not work:
imports Telerik.WebControls |
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As |
Telerik.WebControls.GridItemEventArgs) |
'Check for GridHeaderItem if you wish tooltips only for the header cells |
If TypeOf e.Item Is GridHeaderItem Then |
Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem) |
headerItem("CreditRating").ToolTip = "CreditRating" |
headerItem("PreferredVendorStatus").ToolTip = "PreferredVendorStatus" |
headerItem("ActiveFlag").ToolTip = "ActiveFlag" |
End If |
End Sub |
"Namespace or type specified in the Imports 'Telerik,WebControls' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public memeber. Make sure the imported element name doesn't use any aliases."
So I guess that means that 'WebControls' is not a member of Telerik?
Next, Type 'GridHeaderItem' is not defined.
I deleted the 'Telerik.WebControls' namespace and used the 'Telerik.Web.UI' namespace. I revised the code to:
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) |
'Check for GridHeaderItem if you wish tooltips only for the header cells |
If TypeOf e.Item Is GridHeaderItem Then |
Dim headerItem As GridHeaderItem = TryCast(e.Item, GridHeaderItem) |
headerItem("CreditRating").ToolTip = "CreditRating" |
headerItem("PreferredVendorStatus").ToolTip = "PreferredVendorStatus" |
headerItem("ActiveFlag").ToolTip = "ActiveFlag" |
End If |
End Sub |
The application ran, but I can not see the Tool tips. Is there a correction written somewhere for this?
Thanks!