or
| function OnClientDockPositionChanging(sender, eventArgs) |
| { |
| alert("Stop"); |
| eventArgs.set_cancel(true); |
| } |
| function OnClientDragStart(sender, eventArgs) |
| { |
| alert("Stop Drag"); |
| eventArgs.set_cancel(true); |
| } |
| private RadDock CreateRadDockFromState(DockState state, int number) |
| { |
| RadDock dock = new RadDock(); |
| dock.ID = string.Format("RadDock{0}", number); |
| dock.ApplyState(state); |
| dock.Visible = !state.Closed; |
| dock.Commands.Add(new DockPinUnpinCommand()); |
| dock.OnClientDockPositionChanging = "OnClientDockPositionChanging"; |
| dock.OnClientDragStart = "OnClientDragStart"; |
| return dock; |
| } |
| private RadDock CreateRadDock(int id) |
| { |
| RadDock dock = new RadDock(); |
| dock.ID = string.Format("RadDock{0}", id); |
| dock.Title = txtTitle.Text; |
| dock.Text = txtText.Text + "<br>" + dock.ID; |
| dock.UniqueName = Guid.NewGuid().ToString(); |
| dock.Width = Unit.Pixel(300); |
| dock.Commands.Add(new DockPinUnpinCommand()); |
| dock.OnClientDockPositionChanging = "OnClientDockPositionChanging"; |
| dock.OnClientDragStart = "OnClientDragStart"; |
| return dock; |
| } |
| <telerik:GridTemplateColumn HeaderText="Product" UniqueName="ProductInfo" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left"> |
| <ItemTemplate> |
| <asp:Label ID="Label2" runat="server" Text='<%# Eval("Prod_Name")%>'></asp:Label> |
| <asp:HiddenField ID="hidTreat_ID" runat="server" Value='<%# eval("ID")%>' /> |
| <asp:HiddenField ID="hidSeq" runat="server" Value='<%# bind("Seq")%>' /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:Panel ID="pnlTreat_TN" runat="server"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td style="padding: 0px"> |
| <telerik:RadComboBox ID="ComboBox_CompProdTN" runat="server" AutoPostBack="True" |
| EnableLoadOnDemand="True" Height="120px" ShowMoreResultsBox="true" Skin="Web20" |
| Width="200" OnSelectedIndexChanged="ComboBox_CompProdTN_SelectedIndexChanged" |
| EnableVirtualScrolling="true" EmptyMessage="Select a Product" |
| OnItemsRequested="ComboBox_ItemsRequested" ValidationGroup="SelectProduct" |
| ShowDropDownOnTextboxClick="False"> |
| </telerik:RadComboBox> |
| <asp:RequiredFieldValidator ID="rfvProduct" runat="server" ErrorMessage="← Select Product!" |
| ControlToValidate="ComboBox_CompProdTN" Display="Dynamic" SetFocusOnError="True" |
| Font-Bold="True" Font-Names="Arial" ValidationGroup="SelectProduct"></asp:RequiredFieldValidator> |
| </td> |
| <td align="left" > |
| <asp:Label ID="lblError" runat="server" ForeColor="Red" Visible="false" ></asp:Label> |
| </td> |
| <td align="center" valign="middle"> |
| |
| <asp:ImageButton ID="imgbtnAdvSearch" runat="server" ImageUrl="~/images/buttons/findIcon2.gif" |
| Style="padding: 1px 0px 0px 0px;" ToolTip="Advanced Search" CommandName="FindAI" |
| Visible="false" Height="23px" OnClick="imgbtnAdvSearch_Click" ImageAlign="Middle" |
| Width="22px" /> |
| </td> |
| <td align="center" valign="middle"> |
| |
| <asp:ImageButton ID="imgbtnAddNewCompProd" runat="server" ImageUrl="~/images/buttons/AddProd.png" |
| Style="padding: 1px 0px 0px 0px;" ToolTip="Add New Comparative Product" CommandName="AddCompProd" |
| Visible="false" OnClick="imgbtnAddNewCompProd_Click" Height="23px" ImageAlign="Middle" /> |
| </td > |
| </tr> |
| </table> |
| <asp:HiddenField ID="hidTreat_ID" runat="server" Value='<%# bind("ID")%>' /> |
| <asp:HiddenField ID="hidSeq" runat="server" Value='<%# bind("Seq")%>' /> |
| <asp:HiddenField ID="hidProdTN_ID" runat="server" Value='<%# bind("Prod_ID")%>' /> |
| <asp:HiddenField ID="hidRecType" runat="server" Value='<%# bind("Type")%>' /> |
| </asp:Panel> |
| <asp:Label ID="lblSpecialType" runat="server" Text="" Visible="false" ForeColor="#663300"></asp:Label> |
| </EditItemTemplate> |
| <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" /> |
| </telerik:GridTemplateColumn> |
Please help me out with the solution.
<telerik:GridTemplateColumn UniqueName="DeleteColumn" ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton runat="server" CausesValidation="false" OnClientClick ="if (confirm('Are You Sure You Wish To Delete This Item?'))return true; else return false;" CommandName="Delete" Text="Delete" ID="btnDelete" ForeColor="Blue"></asp:LinkButton> </ItemTemplate>
</telerik:GridTemplateColumn>
Please guide me how i can avoid this?
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
[NullReferenceException: Object reference not set to an instance of an object.] |
Telerik.Web.UI.ControlItem.get_Index() +31
Telerik.Web.UI.RadPanelItem.get_IsFirstVisibleItem() +27