Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
192 views

Hi there,

We are trying to attach a Context Menu to RadNavigation, see sample code below. The context menu only opens for the top level items in the the RADNavigation and not the sub-items. How can we get it working with the sub-items too?

<telerik:RadNavigation ID="RadNavigation1" runat="server" Skin="Bootstrap" MenuButtonPosition="Left" OnClientContextMenu="OnClientContextMenu"
    EnableViewState="false" OnNodeDataBound="RadNavigation1_NodeDataBound" OnClientNodeMouseEnter="OnClientNodeMouseEnter"
    OnClientNodeMouseLeave="OnClientNodeMouseLeave" DataSourceID="SiteMapDataSource1" OnDataBound="RadNavigation1_DataBound">
    <Nodes>
    </Nodes>
</telerik:RadNavigation>
<telerik:RadContextMenu runat="server" ID="ContextMenu2" Skin="Bootstrap" EnableViewState="false"
    OnClientItemClicked="OnClientItemClickedContextMenu">
    <Targets>
       <telerik:ContextMenuControlTarget ControlID="RadNavigation1" />
    </Targets>
    <Items>
        <telerik:RadMenuItem Text="Move ​item up" Value="MoveUp" />
        <telerik:RadMenuItem Text="Move item down" Value="MoveDown" />
    </Items>
</telerik:RadContextMenu>

Peter Milchev
Telerik team
 answered on 29 Aug 2019
6 answers
298 views
I am using a RadGrid and capturing the client click of a row through OnItemCommand. I receive the error:
  • The HTTP verb POST used to access path '/virtual/' is not allowed.

Code (simplified):
protected void Grid_OnItemCommand(object sender, GridCommandEventArgs e)
{
    ...
    Response.Redirect("~/Page.aspx?id=" + id, false);
    ...
}

I think the issue is that the landing page is at the root of the virtual directory. So the postback from the grid is going to /virtual/ and not /virtual/Default.aspx. I think IIS doesn't like the lack of a page.

How do I stop these errors when posting back in a grid to a default document? I can't tell users to type in a fully qualified URL.

Richard
Ram
Top achievements
Rank 1
 answered on 28 Aug 2019
4 answers
210 views

With this RADGrid setup

<telerik:RadGrid ID="RgComparisonGrid" runat="server"
                                        OnInsertCommand="RgComparisonGrid_InsertCommand"
                                        OnUpdateCommand="RgComparisonGrid_UpdateCommand"
                                        OnItemCreated="RgComparisonGrid_ItemCreated"
                                        OnItemInserted="RgComparisonGrid_ItemInserted"
                                        OnItemDataBound="RgComparisonGrid_ItemDataBound"
                                     OnPreRender="RgComparisonGrid_PreRender"
                                        AllowAutomaticInserts="false"
                                        AutoGenerateColumns="false"
                                        OnNeedDataSource="RgComparisonGrid_NeedDataSource"
                                        AllowAutomaticDeletes="false"
                                        AllowAutomaticUpdates="false"
                                        MasterTableView-AllowAutomaticInserts="false">
                                        <MasterTableView AutoGenerateColumns="false" CommandItemDisplay="Top" AllowAutomaticInserts="false"
                                            DataKeyNames="ComparisonId, SubjectId_FK, ResultsId" Font-Size="Medium"
                                            NoMasterRecordsText="No Comparisons Added" CommandItemSettings-AddNewRecordText="Add New Comparison">

I am not able to add a new record I am getting this error message:

Unhandled exception at line 1, column 123034 in http://localhost:52028/bundles/MsAjaxJs?v=c42ygB2U07n37m_Sfa8ZbLGVu4Rr2gsBo7MvUEnJeZ81

0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

 

Anyone have a suggestions as to why?

Perry
Top achievements
Rank 1
 answered on 28 Aug 2019
6 answers
184 views
Hi,
Perhaps I don't understand this control but the code below produces two buttons one below the other but I'd expect the buttons to be next to each other?

<telerik:RadPageLayout ID="RadPageLayout1" runat="server" >
    <Rows>
        <telerik:LayoutRow ID="LayoutRow2" runat="server" AccessKey="" HiddenLg="False" HiddenMd="False" HiddenSm="False" HiddenXl="False" HiddenXs="False" HtmlTag="Div" RowType="Row" ToolTip="" WrapperHtmlTag="None">
            <Columns>
                <telerik:LayoutColumn ID="LayoutColumn3" runat="server" AccessKey="" HiddenLg="False" HiddenMd="False" HiddenSm="False" HiddenXl="False" HiddenXs="False" HtmlTag="Div" Offset="-1" OffsetLg="-1" OffsetMd="-1" OffsetSm="-1" OffsetXl="-1" OffsetXs="-1" Pull="-1" PullLg="-1" PullMd="-1" PullSm="-1" PullXl="-1" PullXs="-1" Push="-1" PushLg="-1" PushMd="-1" PushSm="-1" PushXl="-1" PushXs="-1" Span="12" SpanLg="0" SpanMd="0" SpanSm="0" SpanXl="0" SpanXs="0" ToolTip="">
                    <telerik:RadButton ID="RadButton2" runat="server" Text="RadButton"></telerik:RadButton>   
                </telerik:LayoutColumn>
                <telerik:LayoutColumn ID="LayoutColumn4" runat="server" AccessKey="" HiddenLg="False" HiddenMd="False" HiddenSm="False" HiddenXl="False" HiddenXs="False" HtmlTag="Div" Offset="-1" OffsetLg="-1" OffsetMd="-1" OffsetSm="-1" OffsetXl="-1" OffsetXs="-1" Pull="-1" PullLg="-1" PullMd="-1" PullSm="-1" PullXl="-1" PullXs="-1" Push="-1" PushLg="-1" PushMd="-1" PushSm="-1" PushXl="-1" PushXs="-1" Span="12" SpanLg="0" SpanMd="0" SpanSm="0" SpanXl="0" SpanXs="0" ToolTip="">
                    <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton"></telerik:RadButton>   
                </telerik:LayoutColumn>
            </Columns>
        </telerik:LayoutRow>
    </Rows>
</telerik:RadPageLayout>

Peter Milchev
Telerik team
 answered on 28 Aug 2019
2 answers
250 views

I'm using the RadComboBox to display a list of reports to a user. The reports have and ID and Name which are bound as such DataTextField="Text" DataValueField="ID".

 

The ID of the report is not useful to the end user so we don't want to display the Report ID in the text. However, our site admins and client services people who know the Reports best by ID wish to be able to type the Report ID to filter it this way. 

 

Is it possible to provide such custom filtering? 

 

 

Peter Milchev
Telerik team
 answered on 28 Aug 2019
1 answer
86 views

Hi there,

I am trying to set up a new skin for Telerik UI for ASP AJAX. I’ve been able to set up the skin without too much issue, but a lot of the CSS changes I am making – especially to do with images – seem to be overridden by a file called WebResource.axd. This appears to be a server side caching file. However, I am unable to find out how to clear or refresh this cache.

Can anybody please help and point me in the direction of some way of solving this?

Thanks very much!

G

Attila Antal
Telerik team
 answered on 27 Aug 2019
1 answer
163 views

I have used the below method in javascript of asp.net application but not working:

var chart = $find("<%=RadChart1.ClientID%>"); chart.resetZoom();

 

I have a dynamically generated radhtmlchart for which I need resetzoom. the zoomout option is not userfriendly for large data. can anyone give the correct code in c# or javascript or jquery to resetzoom in radhtmlchart. mine is a asp.net c# application.

https://docs.telerik.com/devtools/aspnet-ajax/controls/chart/client-side/client-side-api

 

 

Vessy
Telerik team
 answered on 27 Aug 2019
2 answers
605 views

Hi, 

Im using Telerik 2015.1.401.45 version.

In the ScriptResource.axd, it is showing that is using the JQuery 1.11.1 version.

But we wanted to removed the JQuery 1.11.1 reference as there might be vulnerability issue.

Is there any way to remove the JQuery from Telerik and not showing in ScriptResource.axd? 

Thanks.

Attila Antal
Telerik team
 answered on 27 Aug 2019
1 answer
150 views

Hello,

I'm to use two ComboBoxes to configure country and city. To prevent the whole page to reload on update the city combobox I want ot use an AjaxPanel with UpdatePanel. This AjaxPanel is surrounded by another AjaxPanel with UpdatePanel. The second AjaPanel is inise a Control which is laded dynamically depending on a selected item of a RadTreeView. The structure (splitted over several controls) looks like this:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">

            ....

                <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="LoadingPanel2">
                    <asp:UpdatePanel ID="locationpanel" runat="server">

                         .....

                              the two ComboBoxes

 

I tried this scenarios to make it work:

- I added a RadAjaxManager inside the mater page with AjaxSettings to update the second ComboBox when the first has changed. The result is that the page is completely empty

- Removed the settings from the RadAjaxManager -> still empty

- Added UpdateMode="Conditional" to the second UpdatePanel -> the page is shown and also the ComboBoxes but they dont work - the drropdown menue is not working

- Added Triggers to the second AjaxPanel -> the same result as without Triggers

I also added asp:DropDownLists and they work as they should, but when i make changes on the Lists i get a LAbel ubove the Listboxes saying "5843|updatePanel|ctl00_MainContent_ctl00_Person1_RadPanelBar1_i0_locationpanel| " 

 

As it's a little bit complicated i uploaded the file to my cloud

https://cloud.fee.de/index.php/s/SIpowivPPpIXpWC

 

I really hope that you can help me solve the problem with the ComboBoxes. Many thanks in advance for your help.

 

Greetings,

Stephan

Vessy
Telerik team
 answered on 27 Aug 2019
2 answers
271 views

I have a RadGrid that I added UseStaticHeaders="true" to and now the last column is partially hidden by the vertical scroll bar (as shown in attached image).

Here is my grid:

        <telerik:RadGrid ID="rgReorderParts" runat="server" Skin="Windows7" CellSpacing="0" CellPadding="0" GridLines="Both" ShowHeader="True" ShowFooter="True"<br>            AutoGenerateColumns="false" AllowMultiRowSelection="true"><br>            <ClientSettings><br>                <Scrolling AllowScroll="True" ScrollHeight="300" UseStaticHeaders="true" /><br>            </ClientSettings><br>            <MasterTableView DataKeyNames="PartNumber" CommandItemDisplay="None"><br>                <CommandItemSettings ShowAddNewRecordButton="false" /><br>                <Columns><br>                    <telerik:GridTemplateColumn HeaderText="View" HeaderStyle-Width="40" ItemStyle-Width="40" ><br>                        <ItemTemplate><br>                            <asp:ImageButton ID="btnViewPart" runat="server" ImageUrl="~/images/icons/pencil.png"<br>                                OnClientClick='<%# String.Format("GetViewPartInfo(""{0}""); return false;", Eval("PartNumber").ToString.EncodeJsString) %>' /><br>                        </ItemTemplate><br>                    </telerik:GridTemplateColumn><br>                    <telerik:GridBoundColumn HeaderText="Part #" DataField="PartNumber" HeaderStyle-Width="100" ItemStyle-Width="100" /><br>                    <telerik:GridBoundColumn HeaderText="Part Description" DataField="PartDescription" HeaderStyle-Width="200" ItemStyle-Width="200" /><br>                    <telerik:GridBoundColumn HeaderText="Max. Level" DataField="MaxStockLevel" DataType="System.Decimal" DataFormatString="{0:0.#####}" <br>                        HeaderStyle-Width="70" ItemStyle-Width="70" /><br>                    <telerik:GridBoundColumn HeaderText="Order Point" DataField="ReorderPoint" DataType="System.Decimal" DataFormatString="{0:0.#####}" <br>                        HeaderStyle-Width="70" ItemStyle-Width="70" /><br>                    <telerik:GridBoundColumn HeaderText="Min. Level" DataField="MinStockLevel" DataType="System.Decimal" DataFormatString="{0:0.#####}" <br>                        HeaderStyle-Width="70" ItemStyle-Width="70" /><br>                    <telerik:GridBoundColumn HeaderText="Expected Qty" DataField="QuantityExpected" DataType="System.Decimal" DataFormatString="{0:0.#####}" <br>                        HeaderStyle-Width="70" ItemStyle-Width="70" /><br>                    <telerik:GridTemplateColumn HeaderText="Supplier" UniqueName="OrderSupplierID" HeaderStyle-Width="210" ItemStyle-Width="210"><br>                        <ItemTemplate><br>                            <telerik:RadComboBox ID="ddlSupplierID" runat="server" Width="190" /><br>                        </ItemTemplate><br>                    </telerik:GridTemplateColumn><br>                    <telerik:GridTemplateColumn HeaderText="Order Quantity" UniqueName="OrderQuantity" HeaderStyle-Width="100" ItemStyle-Width="100"><br>                        <ItemTemplate><br>                            <telerik:RadNumericTextBox ID="txtOrderQuantity" runat="server" Type="Number" MaxValue="9999999.99999" Width="80"<br>                                ClientEvents-OnBlur="FormatZeros_ZeroDecimals" ClientEvents-OnLoad="FormatZeros_ZeroDecimals"<br>                                EnabledStyle-HorizontalAlign="Right" DisabledStyle-HorizontalAlign="Right"><br>                                <NumberFormat DecimalDigits="5" /><br>                            </telerik:RadNumericTextBox><br>                        </ItemTemplate><br>                    </telerik:GridTemplateColumn><br>                    <telerik:GridTemplateColumn HeaderText="UOM" UniqueName="OrderUOM" HeaderStyle-Width="100" ItemStyle-Width="100"><br>                        <ItemTemplate><br>                            <telerik:RadComboBox ID="ddlUOM" runat="server" Width="80" /><br>                        </ItemTemplate><br>                    </telerik:GridTemplateColumn><br>                    <telerik:GridBoundColumn DataField="Warehouse" Display="false" /><br>                    <telerik:GridBoundColumn DataField="UOM" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityOnHand" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityCommitted" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityAvailable" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityOpenPO" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityOpenMOComponent" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityOpenSO" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantityExpected" Display="false" /><br>                    <telerik:GridDateTimeColumn DataField="LastPurchaseDate" DataFormatString="{0:d}" Display="false" /><br>                    <telerik:GridDateTimeColumn DataField="LastSaleDate" DataFormatString="{0:d}" Display="false" /><br>                    <telerik:GridBoundColumn DataField="MinOrderQuantity" Display="false" DataFormatString="{0:0.#####}" /><br>                    <telerik:GridBoundColumn DataField="SupplierID" Display="false" /><br>                    <telerik:GridBoundColumn DataField="SupplierName" Display="false" /><br>                    <telerik:GridBoundColumn DataField="QuantitySuggested" Display="false" /><br>                    <telerik:GridClientSelectColumn HeaderText="Select Line" UniqueName="SelectLine" HeaderTooltip="Select Line" DataType="System.Boolean" <br>                        HeaderStyle-Width="18" ItemStyle-Width="18" /><br>                </Columns><br>            </MasterTableView><br>            <ClientSettings><br>                <Selecting AllowRowSelect="true" UseClientSelectColumnOnly="true" /><br>            </ClientSettings><br><br>        </telerik:RadGrid><br>

 

What do I need to change so the last "SelectLine" column is not partially hidden by the scroll bar?

 

Vessy
Telerik team
 answered on 27 Aug 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?