Hi,
I posted several threads in various Telerik AJAX forums and have not had replies to all. I will try posting here since I'm using the courseware and encountering problems doing the lessons. Hopefully, I'm in the right place now :)
- Unable to see the Tool tips in the column header of the RadGrid
PDF pg 459
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 - Unable to drag and drop rows within a RadGrid
PDF pg. 475
Protected Sub RadGrid1_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) Dim item As GridDataItem = TryCast(e.DraggedItems(0), GridDataItem) RadAjaxManager1.Alert("Dropped VendorID: " + item.GetDataKeyValue("VendorID")) End Sub - Unable to delete records in a RadGrid
PDF pg. 472
[T-SQL] DELETE FROM Purchasing.[Vendor] WHERE [VendorID] = @VendorID
Javascript error:
Line: 7 Char: 62099 Error: Sys.WebForms.PageReuestManagerServerErrorException: The transaction ended in the trigger. The batch has been aborted. Vendors cannot be deleted. They can only be marked as not active - Item insert code not working
PDF pg. 477
Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As GridInsertedEventArgs) If e.Exception <> Nothing Then e.ExceptionHandled = True e.KeepInInsertMode = True DisplayMessage("Product cannot be inserted. Reason: " + e.Exception.Message) Else DisplayMessage("Product inserted") End If End Sub
The compilation error I get using the code in #4 is:
Compiler Error Message: BC30452: Operator '<>' is not defined for types 'System.Exception' and 'System.Exception'.
Also, within the code, there are squiggly lines under "DisplayMessage". The caption is "Name 'DisplayMessage' is not declared". I understand how to declare a variable, but what should I declare it as?
Thanks very much for all help,
r2