Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
132 views
I have a RadGrid with an upload copied from the example. When the cancel, edit or delete buttons are pushed I get a Microsoft JScript runtime error with the following data:

Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. 

I have tried several work arounds but none of them work.

8/18/2011 - Problem solved.
OverCoded
Top achievements
Rank 2
 asked on 17 Aug 2011
3 answers
86 views
Hello,

Please take a look at the attached screenshot. When I click on the filter operator selector (this is, the place where I can pick if I want the field to be EqualTo, NotEqualTo, GreaterThan, etc.) the dropdown centers itself in he middle of the screen, instead of showing right down the Filter component expression being entered. This happens also when I click on the Field selector. Is this a CSS issue? please advice, thanks!
Galin
Telerik team
 answered on 17 Aug 2011
3 answers
110 views
I have a RadComboBox that is populated on demand with a web service with items based off what the user types.  It works fine with a basic string as the text value when I add a RadComboBoxItemData object to the array that I pass back with the web service.  I would like to have a template format when the RadComboBox is opened though.  For example, a name with a formatted address that is a different color than the title and someone dynamically formatted based on what fields exist for each record.  I didn't see an example, so I tried to generate a few HTML tags to handle that.  It displays fine when expanded, although it has the tags for the textbox area.  It would be nice if I could just have the name in the textbox, but the name and formatted address when the RadComboBox is open.  When I select one of the items I get a server 500 error.  In the event viewer, it states that "A potentially dangerous Request.Form value was detected from the client ".  Is there some other way that I should be doing this?  Is the functionality I am looking for even possible right now with the RadComboBox?
Kalina
Telerik team
 answered on 17 Aug 2011
1 answer
99 views

Hi

I have bound a scheduler to the data source using sqldatasource, following instruction from here http://www.telerik.com/help/aspnet-ajax/scheduler-declarative-data-binding.html, except I did not assign any resources. The code is given below at the end.

Problem is when I press the Save in editor I get below error;

 

Invalid object passed in, member name expected. (46): {"command":"InsertAppointment","appointment":{,"Subject":"776","Description":"","Resources":[],"RecurrenceState":0},"startDate":"201108020000","endDate":"201108030000"} 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.ArgumentException: Invalid object passed in, member name expected. (46): {"command":"InsertAppointment","appointment":{,"Subject":"776","Description":"","Resources":[],"RecurrenceState":0},"startDate":"201108020000","endDate":"201108030000"}
Source Error: 
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.  
Stack Trace: 
[ArgumentException: Invalid object passed in, member name expected. (46): {"command":"InsertAppointment","appointment":{,"Subject":"776","Description":"","Resources":[],"RecurrenceState":0},"startDate":"201108020000","endDate":"201108030000"}]
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) +854
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +161
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) +464
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +161
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +81
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +37
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +75
   Telerik.Web.UI.SchedulerPostBackEvent.DeserializeFromJSON(String json, RadScheduler scheduler) +148
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +52
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4645

What am I missing?

Many Thanks

Regards


Code Follows:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Availability.ascx.cs" Inherits="SitefinityWebApp.Widgets.Availability.Availability" %>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConflictDetection="CompareAllValues" 
    ConnectionString="<%$ ConnectionStrings:SitefinityWebApp.Properties.Settings.HSConnection %>" 
    DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @original_ID AND [Subject] = @original_Subject AND (([Description] = @original_Description) OR ([Description] IS NULL AND @original_Description IS NULL)) AND [Start] = @original_Start AND [End] = @original_End AND (([RecurrenceRule] = @original_RecurrenceRule) OR ([RecurrenceRule] IS NULL AND @original_RecurrenceRule IS NULL)) AND (([RecurrenceParentID] = @original_RecurrenceParentID) OR ([RecurrenceParentID] IS NULL AND @original_RecurrenceParentID IS NULL)) AND (([Reminder] = @original_Reminder) OR ([Reminder] IS NULL AND @original_Reminder IS NULL)) AND (([Annotations] = @original_Annotations) OR ([Annotations] IS NULL AND @original_Annotations IS NULL))" 
    InsertCommand="INSERT INTO [Appointments] ([Subject], [Description], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Reminder], [Annotations]) VALUES (@Subject, @Description, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Reminder, @Annotations)" 
    OldValuesParameterFormatString="original_{0}" 
    SelectCommand="SELECT * FROM [Appointments]" 
    UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Description] = @Description, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Reminder] = @Reminder, [Annotations] = @Annotations WHERE [ID] = @original_ID AND [Subject] = @original_Subject AND (([Description] = @original_Description) OR ([Description] IS NULL AND @original_Description IS NULL)) AND [Start] = @original_Start AND [End] = @original_End AND (([RecurrenceRule] = @original_RecurrenceRule) OR ([RecurrenceRule] IS NULL AND @original_RecurrenceRule IS NULL)) AND (([RecurrenceParentID] = @original_RecurrenceParentID) OR ([RecurrenceParentID] IS NULL AND @original_RecurrenceParentID IS NULL)) AND (([Reminder] = @original_Reminder) OR ([Reminder] IS NULL AND @original_Reminder IS NULL)) AND (([Annotations] = @original_Annotations) OR ([Annotations] IS NULL AND @original_Annotations IS NULL))">
    <DeleteParameters>
        <asp:Parameter Name="original_ID" Type="Int32" />
        <asp:Parameter Name="original_Subject" Type="String" />
        <asp:Parameter Name="original_Description" Type="String" />
        <asp:Parameter Name="original_Start" Type="DateTime" />
        <asp:Parameter Name="original_End" Type="DateTime" />
        <asp:Parameter Name="original_RecurrenceRule" Type="String" />
        <asp:Parameter Name="original_RecurrenceParentID" Type="Int32" />
        <asp:Parameter Name="original_Reminder" Type="String" />
        <asp:Parameter Name="original_Annotations" Type="String" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="Subject" Type="String" />
        <asp:Parameter Name="Description" Type="String" />
        <asp:Parameter Name="Start" Type="DateTime" />
        <asp:Parameter Name="End" Type="DateTime" />
        <asp:Parameter Name="RecurrenceRule" Type="String" />
        <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
        <asp:Parameter Name="Reminder" Type="String" />
        <asp:Parameter Name="Annotations" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="Subject" Type="String" />
        <asp:Parameter Name="Description" Type="String" />
        <asp:Parameter Name="Start" Type="DateTime" />
        <asp:Parameter Name="End" Type="DateTime" />
        <asp:Parameter Name="RecurrenceRule" Type="String" />
        <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
        <asp:Parameter Name="Reminder" Type="String" />
        <asp:Parameter Name="Annotations" Type="String" />
        <asp:Parameter Name="original_ID" Type="Int32" />
        <asp:Parameter Name="original_Subject" Type="String" />
        <asp:Parameter Name="original_Description" Type="String" />
        <asp:Parameter Name="original_Start" Type="DateTime" />
        <asp:Parameter Name="original_End" Type="DateTime" />
        <asp:Parameter Name="original_RecurrenceRule" Type="String" />
        <asp:Parameter Name="original_RecurrenceParentID" Type="Int32" />
        <asp:Parameter Name="original_Reminder" Type="String" />
        <asp:Parameter Name="original_Annotations" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" 
    DataKeyField="ID" DataSourceID="SqlDataSource1" DataStartField="Start" 
    DataSubjectField="Subject" SelectedView="MonthView" Skin="Windows7">
</telerik:RadScheduler>
Plamen
Telerik team
 answered on 17 Aug 2011
1 answer
103 views
Hello,

     I have a Rad Ajax Panel in my Page. In this page  i have a Button and a text box. In the Client click function of the button i put a rad alert for alerting a message. Also i have the server side function of the Button Click. If i put the radalert in the client function then complete  page will refreshed. If a i put  javascript alert then ajax will work. I found this problem only in Firefox. Please give the solution for this problem.


     By
Velkumar
Maria Ilieva
Telerik team
 answered on 17 Aug 2011
1 answer
63 views
Hi,

http://www.telerik.com/help/aspnet-ajax/grid-validation.html

I have added this validation to a ascx page, which is opened from a radwindow. The validation works good, but it creates a script error in the page.

Is there any other method to achieve this validation.

Thanks.
eva
Mira
Telerik team
 answered on 17 Aug 2011
9 answers
131 views
Hi,

   I placed the rad dock on a user control and that user control is loaded at run time using Page.LoadControl("controlfile.ascx"). Everything works fine but RadDocLayout.LoadDockLayout event is not firing for some reason.
    I have several panesl in the dock like code below.

<telerik:RadDockLayout runat="server" ID="docLayoutPanels">
    <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="370" MinHeight="200"
        Style="float: left; margin-right: 15px">
        <telerik:RadDock ID="dockImages" runat="server" Title="Image Manager (Image bridge)"
            UniqueName="Images">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadBinaryImage ID="imgPreview1" runat="server" ImageUrl="~/images/NoImageAvailable.gif"
                                Width="150" Height="150" ResizeMode="Fit" />
                        </td>
                        <td>
                            <telerik:RadBinaryImage ID="imgPreview2" runat="server" ImageUrl="~/images/NoImageAvailable.gif"
                                Width="150" Height="150" ResizeMode="Fit" />
                        </td>
                        <td>
                            <asp:HyperLink ID="hypViewALL" runat="server" Text="View All"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="docSalesChannels" runat="server" Title="Sales Channels" UniqueName="SalesChannels">
            <ContentTemplate>
                <telerik:RadGrid ID="grdSalesChannels" runat="server" GridLines="None" AllowPaging="True">
                    <ExportSettings>
                        <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                            PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                    </ExportSettings>
                    <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                        <RowIndicatorColumn Visible="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="False" Resizable="False">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="Channel" UniqueName="TemplateColumn">
                                <ItemTemplate>
                                    <asp:Label ID="lblChannel" runat="server"></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Enabled" UniqueName="TemplateColumn">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkEnabled" runat="server" Enabled="false" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Price" SortExpression="">
                                <ItemTemplate>
                                    <asp:Label ID="lblChannelPrice" runat="server"></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Shipping">
                                <ItemTemplate>
                                    <asp:Label ID="lblShipping" runat="server"></asp:Label>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                    </MasterTableView>
                </telerik:RadGrid>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockKits" runat="server" Title="Kits" UniqueName="Kits">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdKits" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="SKU" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypKitItemId" runat="server" Text='<%# Eval("ChildProductId") %>'
                                                    NavigateUrl='<%# "~/Inventory/Product.aspx?ID=" &  Eval("ChildProductId") %>'></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Qty" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("Qty")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypManageKits" runat="server" Text="Manage Kit"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockKitsRelated" runat="server" Title="Related Kits" UniqueName="RelatedKits">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdKitsRelated" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="SKU" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypKitItemId" runat="server" Text='<%# Eval("ID") %>' NavigateUrl='<%# "~/Inventory/Product.aspx?ID=" &  Eval("ID") %>'></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Product Name" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("ProductName")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypManageRelatedKits" runat="server" Text="Manage Related Kits"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="docShadows" runat="server" Title="Shadows" UniqueName="Shadows">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdShadows" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="SKU" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypShadowID" runat="server" Text='<%# Eval("ID") %>' NavigateUrl='<%# "~/Inventory/Product.aspx?ID=" &  Eval("ID") %>'></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Company" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypCompanyID" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypManageShadows" runat="server" Text="Manage Shadows"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="docPurchaseOrders" runat="server" Title="Purchase Orders" UniqueName="PurchaseOrders">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdPuchaseOrders" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="PO#" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypPONumber" runat="server" Text='<%# Eval("ID") %>' NavigateUrl='<%# "~/Purchasing/PurchaseOrder.aspx?merchantid=" & Eval("CompanyID") & "&orderid=" &  Eval("ID") %>'></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Date" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#CDate(Eval("DateOrdered")).ToShortDateString()%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Qty" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("QtyOrdered")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Unit Price" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#FormatCurrency(Eval("UnitPrice"), 2)%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Discount" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:Label ID="lblDiscount" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Adj. Unit Price" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#FormatCurrency(Eval("AdjustedPrice"), 2)%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Vendor" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypVendor" runat="server" Text='<%# Eval("DisplayName") %>' NavigateUrl='<%# "~/Settings/Vendor.aspx?id=" & Eval("VendorID") & "&MerchantID=" &  Eval("CompanyID") %>'></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypAddNewPO" runat="server" Text="Add to Purchase"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="docInventoryTransfer" runat="server" Title="Inventory Transfers"
            UniqueName="InventoryTransfer">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdInventoryTransfer" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Adjusted On" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#CDate(Eval("AdjustedOn")).ToString("MM/dd/yyyy hh:mm tt")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Adjusted By" UniqueName="TemplateColumn"
                                            Visible="false">
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hypAdjustedBy" runat="server"></asp:HyperLink>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Qty before Adj." UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("InventoryBeforeAdjustment")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Qty Adjusted" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("Quantity")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Reason" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("Reason")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="" UniqueName="DeleteColumn" Visible="false">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" CommandName="Delete"
                                                    CommandArgument='<%# eval("ID") %>' OnClientClick="return confirm('Are you sure you want to delete this adjustment?')"></asp:LinkButton>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypNewAdjustment" runat="server" Text="Adjust Inventory"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockCustomColumns" runat="server" Title="Custom Columns" UniqueName="CustomColumns">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdCustomColumns" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="ColumnName" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:Label ID="lblColName" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Value" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <asp:Label ID="lblValue" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                            <asp:HyperLink ID="hypSelectCustomColumns" Visible="false" Text="Choose Custom Columns"
                                runat="server" NavigateUrl="~/Settings/ProductSummaryPanels.aspx"></asp:HyperLink>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypCustomColumns" runat="server" Text="Manage Custom Columns"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockNotes" runat="server" Title="Notes" UniqueName="Notes">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdNotes" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Note" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%# Eval("Note") %>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypAddNewProductNote" runat="server" Text="Add Note"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="docPurchaseDetails" runat="server" Title="Purchasing Details"
            UniqueName="PurchaseDetails">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        Default Vendor:
                                    </td>
                                    <td>
                                        <asp:HyperLink ID="hypPurchaseDetailDefaultvendor" runat="server"></asp:HyperLink>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Vendor SKU:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPurchaseDetailVendorSKU" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Last Cost:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPurchaseDetailLastCost" runat="server"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        DropShip Mode:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblPurchaseDetailDropShipMode" runat="server"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypViewPurchaseDetails" runat="server" Text="View Purchasing Details"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockVendorPrices" runat="server" Title="Vendor Prices" UniqueName="VendorPrices">
            <ContentTemplate>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <telerik:RadGrid ID="grdVendorPrices" runat="server" GridLines="None" AllowPaging="True">
                                <ExportSettings>
                                    <Pdf PageWidth="8.5in" PageHeight="11in" PageTopMargin="" PageBottomMargin="" PageLeftMargin=""
                                        PageRightMargin="" PageHeaderMargin="" PageFooterMargin=""></Pdf>
                                </ExportSettings>
                                <MasterTableView AutoGenerateColumns="False" AllowSorting="True" PageSize="50">
                                    <RowIndicatorColumn Visible="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="False" Resizable="False">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Vendor" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("DisplayName")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Vendor SKU" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#Eval("VendorSKU")%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Price" UniqueName="TemplateColumn">
                                            <ItemTemplate>
                                                <%#FormatCurrency(Eval("Price"), 2)%>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                    </Columns>
                                    <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                </MasterTableView>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:HyperLink ID="hypViewAllVendorPrices" runat="server" Text="View All"></asp:HyperLink>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </telerik:RadDock>
        <telerik:RadDock ID="dockWareHouses" runat="server" Title="Warehouses" UniqueName="WareHouses">
            <ContentTemplate>
                <uc1:product_warehouseinventory id="Product_WarehouseInventory1" showoffsetqtycolum="false"
                    runat="server" />
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockZone>
</telerik:RadDockLayout>

Weird thing is that the events for the grid (like NeedDataSource) fires correctly and grid get bind. But LoadDockLayout is not firing so I can't load state/positions of the panels from database.
   Is there anything I can do to make sure event is firing?
   Thanks,
   Sameers
Development
Top achievements
Rank 1
 answered on 17 Aug 2011
1 answer
76 views
Hi,

I am using radgrid, with client select enabled, with a client select checkbox, in order to allow multiple rows to be selected.
However, I require a callback when the selection is changed, so that I can check the status of items selected etc.

In order to do this I have the following script linked to the client side OnRowSelected and OnRowDeselected events.
function SelectionChanged(sender, args)
{
  // Refresh by calling RadAjaxManager
  $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest()
}

This creates the callback just fine.
The problem, is that the SelectedItems property of the grid has not been updated with the change just carried out.

Is there a way around this?
Do I need a different event?

thank you

Paul

Tsvetina
Telerik team
 answered on 17 Aug 2011
1 answer
137 views
I have a link button template column in radgrid detail table. I need to click the header to sort it as regular data bound column. How I do this?  I have set AllowSorting="true", not work.

 

 

 

JJ
Top achievements
Rank 1
 answered on 17 Aug 2011
3 answers
184 views
I have a basic root level menu declared and I would like to add child to it dynamically. How do I go about this? Here is what I have declared:

                    <telerik:RadMenu ID="RadMenu1" runat="server" Width="188px">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="Calendars" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Marketing" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Sales" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Supplier Relations" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Training" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="IT" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="HR" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Finance" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Program Solutions" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Other" Width="185px" Font-Bold="True"></telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>
William
Top achievements
Rank 1
 answered on 17 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?