Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 views
I have to say up front the page I'm working on was written by someone else and its all voodoo black magic to me, so I'm lost

We have a loan status page on out web site (asp.net, Telerik version 2015.2.826.45)  which uses the RadGrid for the loans and a second Rad Grid for the history. The way it used to work is when you click on a loan it loaded the history. Some time back it would still work but ONLY after changing to page 2 or greater and going back to page 1.  

I've attached screenshots
* Step 1 navigate to the Loan Status page,
* Step 2 change to any other data pages,
* Step 3 go back to data page 1,
* Step 4 Click a loan, history loads. 

If you change databases pages the history grid keeps the last valid data instead of going blank

Of possible technical importance is that all database calls are located in a separate class and not in the code behind

In the code behind We have
a dsLoan_Selecting which sets/changes a value in the ObjectDataSourceSelectingEventArgs
a dsLoan_Selected which checks the number of rows returned if its greater than 50 it enables a warning message.

One of our other pages did this same thing and I turned off paging all together and the problem went away. that did not happen on this page.

I am including the ascx page code below
Because we are working with financial data I removed any namespaces 

I've never worked with Telerik controls before this and I don't have the best luck working with them with this application so ANY help would be greatly appreciated. 
It's a simple page and I assume it a simple problem because after you page off and back it works fine...

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctlLTStatus.ascx.cs" Inherits="ctlLTStatus" %>

<telerik:RadCodeBlock ID="StatusCodeBlock" runat="server">
    <script type="text/javascript">

        function StatusRowClick(sender, eventArgs) {
            var key = eventArgs.getDataKeyValue("ID");
            document.getElementById("<%= txtLTLoanID.ClientID %>").value = key;
            document.getElementById("<%= hidLoanID.ClientID %>").value = key;
            var detailTable = $find("<%= jdStatusDetail.ClientID %>").get_masterTableView();
            if (detailTable !== null) {
                detailTable.rebind();
            }
            var prpcd = eventArgs.getDataKeyValue("PrepareCD");
            if (prpcd == 'False') {
                document.getElementById("butGenClosingDisclosure").value = 'No Closing Disclosure';
                document.getElementById("butGenClosingDisclosure").disabled = true;
            } else {
                document.getElementById("butGenClosingDisclosure").value = 'Generate UCD XML';
                document.getElementById("butGenClosingDisclosure").disabled = false;
            }
        }
    </script>
</telerik:RadCodeBlock>

<telerik:RadAjaxManagerProxy ID="AjaxproxyStatus" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="gridStatus">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="jdStatusDetail" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<asp:HiddenField ID="hidLoanID" runat="server" />
<asp:HiddenField ID="hdnFileName" runat="server" />

<telerik:RadAjaxPanel ID="StatusAjaxPanal" runat="server" LoadingPanelID="StatusLoading"  Width="100%" CssClass="CRAP2">
    <asp:Panel ID="pnlStatusDefaultButton" runat="server" DefaultButton="statussearchMaster">
        <asp:Panel ID="pnlStatusMessage" runat="server" Width="100%" BackColor="Yellow">
            <asp:Label ID="lblStatusMessage" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;You returned more than 50 results.  Not all loans are displayed, please limit your search" Font-Bold="False" Font-Size="Medium"></asp:Label>
        </asp:Panel>
        <telerik:RadToolBar ID="toolbarStatus" runat="server" Width="100%">
            <Items>
                <telerik:RadToolBarButton runat="server" Text="Search">
                    <ItemTemplate>
                        &nbsp;&nbsp;BMG Invoice:<telerik:RadTextBox ID="txtStatusInvoice" runat="server" />
                        &nbsp;&nbsp;Name:<telerik:RadTextBox ID="txtStatusName" runat="server"></telerik:RadTextBox>
                        &nbsp;&nbsp;Loan Number:<telerik:RadTextBox ID="txtStatusLoanNumber" runat="server"></telerik:RadTextBox>
                        <telerik:RadButton ID="butStatusSearch" runat="server" Text="Search" OnClick="butStatusSearch_Click" BorderStyle="Solid" BorderColor="#c9c9c9" />
                        <span class="RadButton RadButton_Silk rbSkinnedButton">&nbsp;&nbsp;<input type="button" id="butGenClosingDisclosure" onclick="SetTab('ClosingDisclosure');" disabled="disabled" class="rbDecorated" style="display: inline" value="Select a Loan" /></span>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
        <telerik:RadGrid ID="gridStatus" AllowPaging="True" runat="server" AutoGenerateColumns="False" DataSourceID="dsStatus" Width="100%" Height="330px" GridLines="None" CellSpacing="0" AllowSorting="True" Skin="Metro">
            <ClientSettings ClientEvents-OnRowSelected="StatusRowClick">
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="true" />
            </ClientSettings>
            <MasterTableView AllowSorting="True" DataSourceID="dsStatus" OverrideDataSourceControlSorting="True" DataKeyNames="ID, FileNumber, BorrowerName, LoanNumber" ClientDataKeyNames="ID,PrepareCD">
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" />
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True" Created="True" />
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="False" />
                    <telerik:GridBoundColumn DataField="FileNumber" HeaderText="FileNumber" UniqueName="FileNumber" HeaderStyle-Width="150px" HeaderStyle-Wrap="False" />
                    <telerik:GridBoundColumn DataField="BorrowerName" HeaderText="BorrowerName" UniqueName="BorrowerName" HeaderStyle-Width="250px" HeaderStyle-Wrap="False" />
                    <telerik:GridBoundColumn DataField="LenderName" HeaderText="Lender" UniqueName="LenderName" HeaderStyle-Width="300px" />
                    <telerik:GridBoundColumn DataField="ReceivedDate" HeaderText="Received" UniqueName="ReceivedDate" HeaderStyle-Width="200px" />
                    <telerik:GridBoundColumn DataField="CheckedOutByName" HeaderText="CheckedOutBy" UniqueName="CheckedOutByName" HeaderStyle-Width="175px" />
                    <telerik:GridBoundColumn DataField="StatusDescription" HeaderText="Status" UniqueName="StatusDescription" />
                    <telerik:GridBoundColumn DataField="PrepareCD" HeaderText="PrePareCD" UniqueName="PrepareCD" Display="false" />
                </Columns>
                <PagerStyle PageSizeControlType="RadComboBox" />
            </MasterTableView>
            <HeaderStyle Font-Bold="True" />
            <PagerStyle PageSizeControlType="RadComboBox" />
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
        <asp:ObjectDataSource ID="dsStatus" runat="server" SelectMethod="SelectLoansCompleteFromJetDocs" TypeName="DataHelper" OldValuesParameterFormatString="original_{0}" OnSelecting="dsStatus_Selecting" OnSelected="dsStatus_Selected">
            <SelectParameters>
                <asp:Parameter DefaultValue="" Name="name" Type="String" />
                <asp:Parameter DefaultValue="" Name="loanNumber" Type="String" />
                <asp:Parameter DefaultValue="" Name="invoice" Type="String" />
                <asp:Parameter DefaultValue="" Name="jdCompCode" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:Button ID="statussearchMaster" runat="server" OnClick="butStatusSearch_Click" Text="SearchMaster" Style="height: 0px; visibility: hidden;" />
    </asp:Panel>
</telerik:RadAjaxPanel>
<telerik:RadAjaxPanel ID="ajaxStatusHistory" runat="server" LoadingPanelID="StatusLoading" Height="370" Width="100%" Visible="True" CssClass="CRAP">

    <telerik:RadGrid ID="jdStatusDetail" AllowPaging="false"  runat="server" Height="325px" AutoGenerateColumns="False" DataSourceID="dsStatusDetail" Width="100%" GridLines="None" CellSpacing="0" AllowSorting="True" Skin="Metro" CssClass="CRAP3" Visible="True">
        <ClientSettings>
            <Selecting AllowRowSelect="true" />
            <Scrolling AllowScroll="true" />
        </ClientSettings>
        <MasterTableView AllowSorting="True" DataSourceID="dsStatusDetail" OverrideDataSourceControlSorting="True" DataKeyNames="ID">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn Visible="false" DataField="ID" HeaderText="ID" UniqueName="ID" />
                <telerik:GridBoundColumn HeaderStyle-Width="150px" DataField="Status" HeaderText="Status" UniqueName="Status" />
                <telerik:GridBoundColumn HeaderStyle-Width="175px" DataField="BeginDate" HeaderText="BeginDate" UniqueName="BeginDate" />
                <telerik:GridBoundColumn HeaderStyle-Width="175px" DataField="EndDate" HeaderText="EndDate" UniqueName="EndDate" />
                <telerik:GridBoundColumn HeaderStyle-Width="150px" DataField="User"      HeaderText="Processor" UniqueName="User" />
                <telerik:GridBoundColumn DataField="Notes" HeaderText="Notes" UniqueName="Notes" />
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle PageSizeControlType="RadComboBox" />
        </MasterTableView>
        <PagerStyle PageSizeControlType="RadComboBox" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="dsStatusDetail" runat="server" SelectMethod="GetLTHistory" TypeName="DataHelper" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtLTLoanID" DefaultValue="0" Name="id" PropertyName="Value" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="txtLTLoanID" runat="server" />
    <asp:HiddenField ID="txtLTPrefix" runat="server" />
    <asp:HiddenField ID="txtJDCompCode" runat="server" />
</telerik:RadAjaxPanel>

<telerik:RadAjaxLoadingPanel ID="StatusLoading" runat="server">
    Loading Please wait
</telerik:RadAjaxLoadingPanel>



Attila Antal
Telerik team
 answered on 22 Oct 2020
1 answer
84 views

Just getting started with Telerik controls.

I have an older ASP.net Forms system that I need to maintain.  Upcoming Change Request will involve updating or re-doing several reports.  Also, the website could use some better looking pages.

Question is... which Telerik product should I be using for a ASP.net Forms application?

Is it the ASP.net AJAX?

Thanks,

Vessy
Telerik team
 answered on 22 Oct 2020
5 answers
440 views
Hi

We are having a situation in which the grid is binded to millions of rows and we can’t afford network traffic to pull all the data and  then filter.

So I would like to know Is there any way  in telerik radgrid to handle filter the data server side using stored procedures instead of pulling all the data and filtering in the client side?
Doncho
Telerik team
 answered on 22 Oct 2020
40 answers
1.0K+ views

Hello,

Is Telerik.Web.UI, v2011.1.519.40 affected by this vulnerability?

http://www.telerik.com/support/kb/aspnet-ajax/details/cryptographic-weakness?utm_medium=email#partial-patches

 

Thanks

Rumen
Telerik team
 answered on 21 Oct 2020
4 answers
161 views

Hello,

Im having issues with the new telerik theme builder avaible here http://themebuilder.telerik.com/
I created a skin based on Material skin with orange color instead of green.
Then, I placed the files in my App_Theme folder, set EnableEmbeddedSkin to false and Default Skin to "Avanti" (the name of the skin).
However, im getting strange behavior and can't get the skin to render properly.

I attached a screenshot of the result.

What could cause this ?

 

Rumen
Telerik team
 answered on 21 Oct 2020
3 answers
139 views

Hi,

Below is my requirment.

Multi sorting should be applied only when user does CTRL+ click on another column.
If user just clicks on another column, the earlier applied sorting should be removed.

Harshal
Top achievements
Rank 1
 answered on 20 Oct 2020
1 answer
172 views

Hello,

I want the current spreadsheet (imported or just started new) after any changes to be saved somewhere (preferably to Session) so that when I reload the page or navigate to different page and return, the same spreadsheet would load up.

Thank you for any info.

 

Peter Milchev
Telerik team
 answered on 19 Oct 2020
38 answers
1.2K+ views

On a grid with varying sized columns, when I freeze some columns and then attempt to scroll horizontally, the grid scrolls very oddly.

For example, my grid columns that are scrollable (outside the frozen column count) are Last Name, First Name, SSN as well as many others. Last Name and First Name have 120px as their widths. The SSN is 60px wide. When I scroll to the right

The SSN "scrolls" left and assumes the size of the First Name. First Name goes left. The sizing is one issue. But several columns to the right of that appear to scroll first. This is not the desired effect.

I need to scroll by column only or by pixel or something. This scrolling effect isn't acceptable.

Declarations:

 

 

 

 

<telerik:RadGrid ID="grdList" runat="server" AllowPaging="True" AutoGenerateColumns="false" AllowAutomaticInserts="true" AllowSorting="True" PageSize="25" Height="600px" GroupingSettings-CaseSensitive ="false" EnableLinqExpressions="false" >   
  
<MasterTableView TableLayout="Auto" ClientDataKeyNames="Key" EditMode="InPlace" CommandItemDisplay="TopAndBottom" AllowFilteringByColumn="true" HeaderStyle-Font-Size="10px" ItemStyle-Font-Size="10px" FilterItemStyle-Font-Size="10px"
  
<ClientSettings
<Resizing AllowColumnResize="true" AllowRowResize="true" ResizeGridOnColumnResize="true" /> 
<Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="4" /> 
<Selecting AllowRowSelect="true" /> 
<ClientEvents OnCommand="RaiseCommand" /> 
</ClientSettings

 

 

 

Remainder of the content was omitted for brevity.

Thanks,
Matt


EDIT: To clarify, the scrolling works perfectly if I do not set FrozenColumnsCount. It scrolls basically by "pixel" I would say. But when I set FrozenColumnsCount, it is like it scrolls by pixel sorta... but "snaps" to columns. And it does not do a very good job at it.

Doncho
Telerik team
 answered on 16 Oct 2020
3 answers
271 views
Is there a way to submit an authorization header with the ajax request on the client data bind? I cant seem to find anything that would allow me to do something like this

 

 
 
 <script type="text/javascript">
                    //<![CDATA[
                    function ParameterMap(sender, args) {
                        //If you want to send a parameter to the select call you can modify the if
                        //statement to check whether the request type is 'read':
                        //if (args.get_type() == "read" && args.get_data()) {
                        if (args.get_type() != "read" && args.get_data()) {
                            args.set_parameterFormat({ customersJSON: kendo.stringify(args.get_data().models) });
                        }
                    }
 
                    function Parse(sender, args) {
                        var response = args.get_response().d;
                        if (response) {
                            args.set_parsedData(response.Data);
                        }
                    }
 
                    function UserAction(sender, args) {
                        if (sender.get_batchEditingManager().hasChanges(sender.get_masterTableView()) &&
                            !confirm("Any changes will be cleared. Are you sure you want to perform this action?")) {
                            args.set_cancel(true);
                        }
                    }
    //]]>
</script>
<telerik:RadFormDecorator RenderMode="Lightweight" runat="server" DecorationZoneID="grid" DecoratedControls="All" EnableRoundedCorners="false" />
          <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" ClientDataSourceID="RadClientDataSource1" AllowPaging="true" AllowSorting="true" >
            <MasterTableView ClientDataKeyNames="CustomerID" CommandItemDisplay="Top" BatchEditingSettings-HighlightDeletedRows="true">
                <CommandItemSettings ShowAddNewRecordButton="false" />
                <Columns>
                    <telerik:GridBoundColumn DataField="Datetime" HeaderText="Customer ID" ReadOnly="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PlantName" HeaderText="Company Name" ColumnEditorID="GridTextBoxEditor">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MachinName" HeaderText="Contact Name" ColumnEditorID="GridTextBoxEditor">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MachineID" HeaderText="Contact Title" ColumnEditorID="GridTextBoxEditor">
                    </telerik:GridBoundColumn>
 
                </Columns>
            </MasterTableView>
            <ClientSettings>
            <DataBinding Location="http://localhost:2036/api/sample/" SelectMethod="100TEST" SortParameterType="Linq" FilterParameterType="Linq">
            </DataBinding>
                <ClientEvents OnUserAction="UserAction" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxEditor" runat="server" TextBoxStyle-Width="230px"></telerik:GridTextBoxColumnEditor>
    <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="true">
        <ClientEvents OnCustomParameter="ParameterMap" OnDataParse="Parse" />
     <%--   <DataSource>
            <WebServiceDataSourceSettings BaseUrl="http://localhost:2036/api/sample/">
                <Select Url="100TEST" DataType="JSON" />
                <Update Url="UpdateCustomers" DataType="JSON" />
                <Insert Url="InsertCustomers" DataType="JSON" />
                <Delete Url="DeleteCustomers" DataType="JSON" />
            </WebServiceDataSourceSettings>
        </DataSource>--%>
        <Schema>
            <Model ID="CustomerID">
                <telerik:ClientDataSourceModelField FieldName="Datetime" DataType="String"  />
                <telerik:ClientDataSourceModelField FieldName="PlantName" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="MachinName" DataType="String" />
                <telerik:ClientDataSourceModelField FieldName="MachineID" DataType="String" />
            </Model>
        </Schema>
    </telerik:RadClientDataSource>
Peter Milchev
Telerik team
 answered on 16 Oct 2020
3 answers
183 views

I work for Local Government in the UK. I'm trying to make our web site accessible in time for the UK Government's upcoming deadline of September 2020 for Level AA compliance.

This Scheduler accessibility page states it is Level AA compliant:

https://demos.telerik.com/aspnet-ajax/scheduler/examples/accessibility/defaultvb.aspx

But I'm getting the following 3 failures, which your demo page above also fails on:

 

  • Each a element must contain text or an img with an alt attribute. WCAG 2.1 A F89, Section 508 (2017) A F89
  • Identify row and column headers in data tables using th elements, and mark layout tables with role=presentation. WCAG 2.1 A F91, Section 508 (2017) A F91
  • This page uses nested tables, which do not make sense when read in a screen reader. WCAG 2.1 A F49, Section 508 (2017) A F49

I'm using the latest 617 release. Am I missing something?

Peter Milchev
Telerik team
 answered on 15 Oct 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?