Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
103 views
there is one radcombobox and radgrid in the page, when the selection changed in the combobox, it will reload grid base on selection. the grid takes a while to load, now during this loading time, the user will feel like nothing happening... how can I put a loading panel above the grid after radcombobox is selected?

the grid itself does have loading icon in the bottom left corner, it shows when the action is initiated from the grid(for example, filtering), but it doesn't when the action is out of the grid (in this case, the action is from radcombobox).

thanks.
Henry
Top achievements
Rank 1
 answered on 11 Apr 2012
3 answers
90 views
Hi i'm using this code.

function disable()  
{  
   var picker = $find("<%= RadDatePicker1.ClientID %>");  
   picker.set_enabled(false);  
}  
function enable()  
{  
   var picker = $find("<%= RadDatePicker1.ClientID %>");         
   picker.set_enabled(true);  
}     

It disables the RadDatePicker but it also breaks the SharedCalendar that the DatePicker is using. Which means all other DatePickers on the page stop working correctly. Please Advise.
Thanks.
Tom Jaspering
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
48 views
Hi all,

I am new to the forum but have been using Telerik controls since 2005 - 2006. I recently purchased the Q1 2012 premium collection and have deffinitely seen some changes. I am a big fan of Telerik and am getting started on two new projects that i want to use the new Q1 2012 controls on.

My Question: Is it best to create a RadControls Web Site or Asp.net Web Site and configure the project afterward for the radcontrols. Or is it any difference.

Reason is that i started the project and was brining over my first rad control and ran to the issue with the skins. I checked out the forum on the topic and have been running into some hurdles.

Does creating a Radcontrol Website overcome those hurdles off the start or no difference.

Sorry to sound so newbie but wanted to check incase i am not getting the full run down.

John S.
Kramb
Top achievements
Rank 1
 answered on 11 Apr 2012
3 answers
195 views
Hello All,
      I am working ASP.net 2008, SSRS. I have successfully created Dynamic controls based on the selected report Parameter DataType and everything works fine.
     I am trying to add validations by using the Validator controls for the dynamic RadDatePicker controls. In my scenario, I am creating two RadDatePicker controls each for StartDate and EndDate. My condition is : StartDate cannot be greater than the EndDate.
     When I assign ControlToValidate and ControlToCompare for dynamically created RadDatePicker controls it is causing me problems. The error is:

Control 'dtE' referenced by the ControlToCompare property of 'dtCmpVal' cannot be validated.

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.Web.HttpException: Control 'dtE' referenced by the ControlToCompare property of 'dtCmpVal' cannot be validated.

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:

[HttpException (0x80004005): Control 'dtE' referenced by the ControlToCompare property of 'dtCmpVal' cannot be validated.]
   System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty(String name, String propertyName) +1840513
   System.Web.UI.WebControls.CompareValidator.ControlPropertiesValid() +1735335
   System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +33
   System.Web.UI.Control.PreRenderRecursiveInternal() +86
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Control.PreRenderRecursiveInternal() +170
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041



Please help me , in figuring out to add Compare Validator or RangeValidator using Dynamic Controls.

--Deepak
Koushik
Top achievements
Rank 1
 answered on 11 Apr 2012
7 answers
261 views
Hi All

I'm using a RadComboBox with checkboxes. How do I pre select one of the checkbox items?

I'm setting the variable like this:

ConsultantCode = dl_ds.Tables(0).Rows(0)("ConsultantCode")

I have tried ddlSpecialty.selectedvalue = ConsultantCode. but nothing happens

And

Dim chk1 As CheckBox = DirectCast(ddlSpecialty.FindItemByText(ConsultantCode).FindControl("CheckBox"), CheckBox)
chk1.Checked = True
but chk1 alwas returns nothing

Andy
Andy Green
Top achievements
Rank 2
 answered on 11 Apr 2012
4 answers
180 views
I have a RadGrid and am trying to get paging working with an ObjectDataSource. I have used the demo as the basis as well as a number of other forum postings, but can't seem to get the paging to display or work. RadGrid does not seem to ever call the SelectCountMethod, so I returned the totalRows and set the VirtualItemCount in the Selected event. The PageSize never gets passed into the MaximumRows in the ODS so I set the MaximumRows in the Selecting event. I have pasted the code below. If you guys need I will try to isolate a test project to reproduce, but I was hoping you might be able to discern what I am missing (I am guessing it is something obvious) by looking at the code. Unfortunately I cannot get the code snippet tool to work (probably our overly restrictive proxy) so the code is pasted below:


ucLoanSearch.ascx:

<%

 

@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucLoanSearch.ascx.cs" Inherits="VHIWebSite.Controls.ucLoanSearch" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

 

script type="text/javascript" language="javascript">

 

</

 

 

script>

 

<

 

 

telerik:RadScriptManager ID="ScriptManager" runat="server" />

 

<

 

 

asp:ObjectDataSource ID="SearchByNameObjectDataSource" EnablePaging="true"

 

 

 

SelectCountMethod="SearchByNameCount" SortParametername="SortColumns"

 

 

 

MaximumRowsParameterName = "maximumRows" StartRowIndexParameterName="startRowIndex"

 

 

 

TypeName="TellerBL.TellerDataObjects" SelectMethod="SearchByName"

 

 

 

EnableCaching="false" runat="server"

 

 

 

onselecting="SearchByNameObjectDataSource_Selecting"

 

 

 

onselected="SearchByNameObjectDataSource_Selected">

 

<

 

 

SelectParameters>

 

 

 

<asp:Parameter Name="mspDataConnectString" Type="String" />

 

 

 

<asp:Parameter Name="clientCode" Type="String" />

 

 

 

<asp:Parameter Name="firstName" Type="String" />

 

 

 

<asp:Parameter Name="lastName" Type="String" />

 

 

 

<asp:Parameter Name="totalRows" Direction="Output" Type="Int32" />

 

</

 

 

SelectParameters>

 

</

 

 

asp:ObjectDataSource>

 

<

 

 

asp:ObjectDataSource ID="SearchByAddressObjectDataSource" EnablePaging="true" SelectCountMethod="SearchByAddressCount" SortParametername="SortColumns"

 

 

 

TypeName="TellerBL.TellerDataObjects" SelectMethod="SearchByAddress" EnableCaching="false" runat="server"

 

 

 

onselecting="SearchByAddressObjectDataSource_Selecting">

 

<

 

 

SelectParameters>

 

 

 

<asp:Parameter Name="mspDataConnectString" Type="String" />

 

 

 

<asp:Parameter Name="clientCode" Type="String" />

 

 

 

<asp:Parameter Name="houseNumber" Type="String" />

 

 

 

<asp:Parameter Name="street" Type="String" />

 

 

 

<asp:Parameter Name="city" Type="String" />

 

 

 

<asp:Parameter Name="state" Type="String" />

 

 

 

<asp:Parameter Name="zipCode" Type="String" />

 

</

 

 

SelectParameters>

 

</

 

 

asp:ObjectDataSource>

 

<

 

 

table cellspacing="0" cellpadding="0">

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"

 

 

 

SelectedIndex="0" CssClass="TabStrip" ontabclick="RadTabStrip1_TabClick"

 

 

 

CausesValidation="False" ClickSelectedTab="True">

 

 

 

<Tabs>

 

 

 

<telerik:RadTab Text="Loan Number" Selected="True">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab Text="Borrower/Co-Borrower">

 

 

 

</telerik:RadTab>

 

 

 

<telerik:RadTab Text="Property Address">

 

 

 

</telerik:RadTab>

 

 

 

</Tabs>

 

 

 

</telerik:RadTabStrip>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"

 

 

 

CssClass="PageView">

 

 

 

<telerik:RadPageView ID="LoanNumberPageView" runat="server">

 

 

 

<table cellspacing="0" cellpadding="0" style="padding-left:10px;padding-top:10px">

 

 

 

<tr valign="top">

 

 

 

<td colspan="4">

 

 

 

<asp:Label ID="LoanNumberLabel" runat="server" Text="Label">Loan Number:</asp:Label>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<asp:TextBox ID="LoanNumberTextBox" CssClass="TellerInput TellerRequired" CausesValidation="true" MaxLength="10" Width="100px" runat="server" ValidationGroup="loan"></asp:TextBox>

 

 

 

<asp:RegularExpressionValidator ID="LoanNumberRegularExpressionValidator" ValidationGroup="loan" ControlToValidate="LoanNumberTextBox" runat="server" Display="None" ValidationExpression="^\d{0,10}" ErrorMessage="Loan Number must be numeric."></asp:RegularExpressionValidator>

 

 

 

<asp:CustomValidator ValidationGroup="loan" ID="LoanNumberCustomValidator" runat="server" Display="None" ErrorMessage="Invalid Loan Number." onservervalidate="LoanNumberCustomValidator_ServerValidate"></asp:CustomValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;&nbsp;&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:Button id="SearchButton" runat="server" CssClass="TellerInput" UseSubmitBehavior="false" Text="Go" onclick="SearchButton_Click" ValidationGroup="loan" CausesValidation="True" />

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td colspan="4">

 

 

 

<asp:ValidationSummary ID="LoanNumberValidationSummary" DisplayMode="BulletList" runat="server" ValidationGroup="loan" SkinID="TellerSkin" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="NamePageView" runat="server" DefaultButton="NameSearchButton">

 

 

 

<div id="nameDiv" runat="server">

 

 

 

<table cellspacing="0" cellpadding="0" style="padding-left:10px;padding-top:10px">

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<asp:Label ID="LastNameLabel" runat="server">Last</asp:Label>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:Label ID="FirstNameLabel" runat="server">First</asp:Label>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<asp:TextBox ID="LastNameTextBox" CssClass="TellerInput TellerRequired" CausesValidation="true" MaxLength="10" Width="150px" runat="server" ValidationGroup="name"></asp:TextBox>

 

 

 

<asp:RegularExpressionValidator ID="LastNameRegularExpressionValidator" ValidationGroup="name" ControlToValidate="LastNameTextBox" runat="server" Display="None" ValidationExpression="^[a-zA-Z]{2,}$" ErrorMessage="Please enter at least two characters for Last Name."></asp:RegularExpressionValidator>

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator3" ValidationGroup="name" ControlToValidate="LastNameTextBox" runat="server" Display="None" ErrorMessage="Please enter a Last Name."></asp:RequiredFieldValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="FirstNameTextBox" CssClass="TellerInput" CausesValidation="true" MaxLength="10" Width="150px" runat="server" ValidationGroup="name"></asp:TextBox>

 

 

 

</td>

 

 

 

<td>&nbsp;&nbsp;&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:Button id="NameSearchButton" runat="server" CssClass="TellerInput"

 

 

 

UseSubmitBehavior="false" Text="Search"

 

 

 

onclick="NameSearchButton_Click" ValidationGroup="name"

 

 

 

CausesValidation="True" />

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td colspan="6">

 

 

 

<asp:ValidationSummary ID="ValidationSummary1" DisplayMode="BulletList" runat="server" ValidationGroup="name" SkinID="TellerSkin" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

</telerik:RadPageView>

 

 

 

<telerik:RadPageView ID="AddressPageView" runat="server" DefaultButton="PropertySearchButton">

 

 

 

<table cellspacing="0" cellpadding="0" style="padding-left:10px;padding-top:10px">

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<asp:Label ID="Label2" runat="server">H/B&nbsp;#</asp:Label>

 

 

 

</td>

 

 

 

<td>&nbsp;&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:Label ID="Label3" runat="server">Street</asp:Label>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td><asp:Label ID="Label1" runat="server">City</asp:Label></td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td><asp:Label ID="Label4" runat="server">State</asp:Label></td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td><asp:Label ID="Label5" runat="server">Zip&nbsp;Code</asp:Label></td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td>

 

 

 

<asp:TextBox ID="HouseNumberTextBox" CssClass="TellerInput" CausesValidation="true" MaxLength="10" Width="50px" runat="server" ValidationGroup="address"></asp:TextBox>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="StreetTextBox" CssClass="TellerInput TellerRequired" CausesValidation="true" MaxLength="10" Width="150px" runat="server" ValidationGroup="address"></asp:TextBox>&nbsp;

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator4" ValidationGroup="address" ControlToValidate="StreetTextBox" runat="server" Display="None" ErrorMessage="Please enter a Street Name."></asp:RequiredFieldValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="CityTextBox" CssClass="TellerInput TellerRequired" CausesValidation="true" MaxLength="10" Width="100px" runat="server" ValidationGroup="address"></asp:TextBox>&nbsp;

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationGroup="address" ControlToValidate="CityTextBox" runat="server" Display="None" ErrorMessage="Please enter a City."></asp:RequiredFieldValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="StateTextBox" CssClass="TellerInput TellerRequired" CausesValidation="true" MaxLength="2" Width="20px" runat="server" ValidationGroup="address"></asp:TextBox>&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationGroup="address" ControlToValidate="StateTextBox" runat="server" Display="None" ErrorMessage="Please enter a State."></asp:RequiredFieldValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:TextBox ID="ZipTextBox" CssClass="TellerInput" CausesValidation="true" MaxLength="10" Width="50px" runat="server" ValidationGroup="address"></asp:TextBox>&nbsp;

 

 

 

<asp:RegularExpressionValidator ID="RegularExpressionValidator4" ValidationGroup="address" ControlToValidate="ZipTextBox" runat="server" Display="None" ValidationExpression="^[0-9]{0,5}$" ErrorMessage="Zip Code must be 5 digits."></asp:RegularExpressionValidator>

 

 

 

</td>

 

 

 

<td>&nbsp;&nbsp;</td>

 

 

 

<td>

 

 

 

<asp:Button id="PropertySearchButton" runat="server" CssClass="TellerInput"

 

 

 

UseSubmitBehavior="false" Text="Search"

 

 

 

onclick="PropertySearchButton_Click" ValidationGroup="address"

 

 

 

CausesValidation="True" />

 

 

 

</td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top" class="TellerAnnotation">

 

 

 

<td>House&nbsp;or<br />Building&nbsp;Number</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>Please use only the street name<br />(e.g. &quot;Main&quot; instead of &quot;N. Main St.&quot;)</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>&nbsp;</td>

 

 

 

<td>(5 digits only)</td>

 

 

 

<td>&nbsp;</td>

 

 

 

</tr>

 

 

 

<tr valign="top">

 

 

 

<td colspan="6">

 

 

 

<asp:ValidationSummary ID="ValidationSummary2" DisplayMode="BulletList" runat="server" ValidationGroup="address" SkinID="TellerSkin" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</telerik:RadPageView>

 

 

 

</telerik:RadMultiPage>

 

 

 

</td>

 

</

 

 

tr>

 

<

 

 

tr>

 

 

 

<td>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"

 

 

 

runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="SearchResultsRadGrid" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

<telerik:RadGrid runat="server" ID="SearchResultsRadGrid"

 

 

 

AutoGenerateColumns="False" Visible="False"

 

 

 

EnableHeaderContextMenu="True" AllowSorting="True" BorderStyle="Solid"

 

 

 

CellSpacing="0" GridLines="None" BorderWidth="1px" BorderColor="Black"

 

 

 

onitemcommand="SearchResultsRadGrid_ItemCommand"

 

 

 

AllowCustomPaging="False" PageSize ="10"

 

 

 

AllowPaging="True" GroupingEnabled="False" EnableLinqExpressions="false" >

 

 

 

<clientsettings allowcolumnsreorder="False"

 

 

 

allowgroupexpandcollapse="False" reordercolumnsonclient="False"

 

 

 

enablepostbackonrowclick="True">

 

 

 

<Selecting AllowRowSelect="True" enabledragtoselectrows="False"></Selecting>

 

 

 

</clientsettings>

 

 

 

<PagerStyle AlwaysVisible="true" Mode="NumericPages"></PagerStyle>

 

 

 

<mastertableview allowpaging="False" commanditemdisplay="None" OverrideDataSourceControlSorting="True" CanRetrieveAllData="false"

 

 

 

datakeynames="Id, LoanNo" insertitempageindexaction="ShowItemOnCurrentPage"

 

 

 

grouploadmode="Server" GroupsDefaultExpanded="False">

 

 

 

<commanditemsettings exporttopdftext="Export to PDF" />

 

 

 

<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

 

 

 

<rowindicatorcolumn filtercontrolalttext="Filter RowIndicator column"

 

 

 

visible="True">

 

 

 

</rowindicatorcolumn>

 

 

 

<expandcollapsecolumn filtercontrolalttext="Filter ExpandColumn column"

 

 

 

visible="True">

 

 

 

</expandcollapsecolumn>

 

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn DataField="BorrowerName" UniqueName="BorrowerName" HeaderText="Borrower" >

 

 

 

<ItemStyle Wrap="False"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="BorrowerSSNFormatted" UniqueName="BorrowerSSNFormatted" HeaderText="Borrower&nbsp;SSN" >

 

 

 

<ItemStyle Wrap="False"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="CoBorrowerName" UniqueName="CoBorrowerName" HeaderText="Co-Borrower" >

 

 

 

<ItemStyle Wrap="False"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="CoBorrowerSSNFormatted" UniqueName="CoBorrowerSSNFormatted" HeaderText="Co&#8209;Borrower&nbsp;SSN" >

 

 

 

<ItemStyle Wrap="False"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridBoundColumn DataField="PropertyAddress" UniqueName="PropertyAddress" HeaderText="Property&nbsp;Address" >

 

 

 

<ItemStyle Wrap="False"/>

 

 

 

</telerik:GridBoundColumn>

 

 

 

</Columns>

 

 

 

<editformsettings>

 

 

 

<editcolumn filtercontrolalttext="Filter EditCommandColumn column">

 

 

 

</editcolumn>

 

 

 

</editformsettings>

 

 

 

</mastertableview>

 

 

 

<filtermenu enableimagesprites="False">

 

 

 

</filtermenu>

 

 

 

</telerik:RadGrid>

 

 

 

</td>

 

</

 

 

tr>

 

</

 

 

table>

 




ucLoanSearch.ascx.cs:

using

 

 

System;

 

using

 

 

System.Collections.Generic;

 

using

 

 

System.Linq;

 

using

 

 

System.Web;

 

using

 

 

System.Web.UI;

 

using

 

 

System.Web.UI.WebControls;

 

using

 

 

TellerBL;

 

using

 

 

DmiCore.DataAccess;

 

using

 

 

System.Configuration;

 

using

 

 

System.Web.Profile;

 

using

 

 

DMI.UserManagement;

 

using

 

 

Dmi.Extensions;

 

using

 

 

Telerik.Web.UI;

 

 

namespace

 

 

VHIWebSite.Controls

 

{

 

 

public partial class ucLoanSearch : System.Web.UI.UserControl

 

{

 

 

const string CLIENTCODE = "ClientCode";

 

 

 

const string CUSTOMERID = "CustomerId";

 

 

 

const string GOTO_PAGE = "~/TellerWeb/LoanSummary.aspx";

 

 

 

public string ClientCode

 

{

 

 

get

 

{

 

 

Object o = ViewState[CLIENTCODE];

 

 

 

if (o == null)

 

 

 

if (PopulateClientCustInfo())

 

 

 

return ViewState[CLIENTCODE].ToString();

 

 

 

return o.ToString();

 

}

 

 

set

 

{

 

 

if (!String.IsNullOrEmpty(value))

 

ViewState[CLIENTCODE] =

 

value;

 

}

}

 

 

public string CustomerId

 

{

 

 

get

 

{

 

 

Object o = ViewState[CUSTOMERID];

 

 

 

if (o == null)

 

 

 

if (PopulateClientCustInfo())

 

 

 

return ViewState[CUSTOMERID].ToString();

 

 

 

return o.ToString();

 

}

 

 

set

 

{

 

 

if (!String.IsNullOrEmpty(value))

 

ViewState[CUSTOMERID] =

 

value;

 

}

}

 

 

public string LoanNumber

 

{

 

 

get

 

{

 

 

return LoanNumberTextBox.Text;

 

}

 

 

set

 

{

LoanNumberTextBox.Text =

 

value;

 

}

}

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

SetDefaultFocus();

}

 

 

protected bool PopulateClientCustInfo()

 

{

 

 

User currentUser = UserManager.GetUser(HttpContext.Current.User.Identity.Name);

 

 

 

if (currentUser == null)

 

 

 

return false;

 

 

 

Customer c = CustomerManager.GetCustomer(currentUser.CustomerID);

 

 

 

if (c == null)

 

 

 

return false;

 

 

 

Client cl = ClientManager.GetClient(c.ClientID);

 

 

 

if (cl == null)

 

 

 

return false;

 

ViewState[CUSTOMERID] = c.CustomerID;

ViewState[CLIENTCODE] = cl.ClientCode;

 

 

return true;

 

}

 

 

protected void SearchButton_Click(object sender, EventArgs e)

 

{

 

 

if (Page.IsValid)

 

{

Session[

 

TellerStringConstants.TellerLoanNo] = LoanNumberTextBox.Text;

 

Response.Redirect(GOTO_PAGE);

}

}

 

 

protected void LoanNumberCustomValidator_ServerValidate(object source, ServerValidateEventArgs args)

 

{

args.IsValid =

 

true;

 

 

 

string loanNumber = String.Empty;

 

 

 

if (!String.IsNullOrEmpty(LoanNumberTextBox.Text))

 

{

LoanNumberTextBox.Text = LoanNumberTextBox.Text.PadLeft(10,

 

'0');

 

loanNumber = LoanNumberTextBox.Text;

}

 

 

else

 

{

args.IsValid =

 

false;

 

 

 

return;

 

}

 

 

if (!loanNumber.IsValidLoanNumber())

 

{

EventLog.

 

Web.OnTellerInvalidLoanNumber(ConfigurationManager.ConnectionStrings["LoggingEntity"].ToString(),

 

 

 

"Failed parity check", true, Request.ServerVariables["remote_addr"].ToString(),

 

 

 

ConfigurationManager.AppSettings["ApplicationName"].ToString(), Page.Request.Url.AbsoluteUri, HttpContext.Current.User.Identity.Name, Session[TellerStringConstants.TellerLoanNo] != null ? Session[TellerStringConstants.TellerLoanNo].ToString() : String.Empty);

 

args.IsValid =

 

false;

 

 

 

return;

 

}

 

 

DataErrors errorCode;

 

 

 

IHeaderInfo hi = TellerDataObjects.GetHeaderInfo(ConfigurationManager.ConnectionStrings[TellerStringConstants.MspDataEntity].ToString(), loanNumber, out errorCode);

 

 

 

if (hi == null)

 

{

EventLog.

 

Web.OnTellerInvalidLoanNumber(ConfigurationManager.ConnectionStrings["LoggingEntity"].ToString(),

 

 

 

"Loan Number does not exist.", true, Request.ServerVariables["remote_addr"].ToString(),

 

 

 

ConfigurationManager.AppSettings["ApplicationName"].ToString(), Page.Request.Url.AbsoluteUri, HttpContext.Current.User.Identity.Name, loanNumber);

 

args.IsValid =

 

false;

 

 

 

return;

 

}

 

 

}

 

 

protected void SearchByNameObjectDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)

 

{

e.InputParameters[

 

"mspDataConnectString"] = ConfigurationManager.ConnectionStrings[TellerStringConstants.MspDataEntity].ToString();

 

e.InputParameters[

 

"clientCode"] = ClientCode;

 

e.InputParameters[

 

"firstName"] = FirstNameTextBox.Text;

 

e.InputParameters[

 

"lastName"] = LastNameTextBox.Text;

 

e.Arguments.MaximumRows = 10;

}

 

 

protected void SearchByAddressObjectDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)

 

{

e.InputParameters[

 

"mspDataConnectString"] = ConfigurationManager.ConnectionStrings[TellerStringConstants.MspDataEntity].ToString();

 

e.InputParameters[

 

"clientCode"] = ClientCode;

 

e.InputParameters[

 

"houseNumber"] = HouseNumberTextBox.Text;

 

e.InputParameters[

 

"street"] = StreetTextBox.Text;

 

e.InputParameters[

 

"city"] = CityTextBox.Text;

 

e.InputParameters[

 

"state"] = StateTextBox.Text;

 

e.InputParameters[

 

"zipCode"] = ZipTextBox.Text;

 

e.Arguments.MaximumRows = 10;

}

 

 

protected void SearchResultsRadGrid_ItemCommand(object sender, GridCommandEventArgs e)

 

{

 

 

if (e.CommandName == "RowClick")

 

{

 

 

GridDataItem dataItem = (GridDataItem)SearchResultsRadGrid.SelectedItems[0];

 

 

 

if (dataItem != null)

 

{

 

 

object o = dataItem.GetDataKeyValue("Id");

 

 

 

if (o == null)

 

 

 

return;

 

 

 

object os = dataItem.GetDataKeyValue("LoanNo");

 

 

 

if (os == null)

 

 

 

return;

 

Session[

 

TellerStringConstants.TellerLoanNo] = os.ToString();

 

Response.Redirect(GOTO_PAGE);

}

}

}

 

 

protected void NameSearchButton_Click(object sender, EventArgs e)

 

{

 

 

if (Page.IsValid)

 

{

SearchResultsRadGrid.DataSourceID =

 

"SearchByNameObjectDataSource";

 

SearchResultsRadGrid.Visible =

 

true;

 

SearchResultsRadGrid.DataBind();

}

}

 

 

protected void PropertySearchButton_Click(object sender, EventArgs e)

 

{

 

 

if (Page.IsValid)

 

{

SearchResultsRadGrid.DataSourceID =

 

"SearchByAddressObjectDataSource";

 

SearchResultsRadGrid.DataBind();

SearchResultsRadGrid.Visible =

 

true;

 

}

}

 

 

protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)

 

{

SearchResultsRadGrid.Visible =

 

false;

 

SetDefaultFocus();

 

 

foreach (Control ctrl in Page.Controls)

 

ClearControls(ctrl);

}

 

 

private void ClearControls(Control c)

 

{

 

 

foreach (Control ctrl in c.Controls )

 

{

 

 

if (ctrl is TextBox)

 

((

 

TextBox)(ctrl)).Text = null;

 

 

 

if (ctrl.Controls.Count > 0)

 

ClearControls(ctrl);

}

}

 

 

 

 

private void SetDefaultFocus()

 

{

 

 

switch (RadTabStrip1.SelectedIndex)

 

{

 

 

case 0:

 

Page.Form.DefaultButton = SearchButton.UniqueID;

LoanNumberTextBox.Focus();

 

 

break;

 

 

 

case 1:

 

Page.Form.DefaultButton = NameSearchButton.UniqueID;

LastNameTextBox.Focus();

 

 

break;

 

 

 

case 2:

 

Page.Form.DefaultButton = PropertySearchButton.UniqueID;

HouseNumberTextBox.Focus();

 

 

break;

 

}

}

 

 

protected void SearchByNameObjectDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)

 

{

SearchResultsRadGrid.PageSize = 10;

SearchResultsRadGrid.AllowPaging =

 

true;

 

SearchResultsRadGrid.MasterTableView.VirtualItemCount = (

 

int)e.OutputParameters["totalRows"];

 

SearchResultsRadGrid.VirtualItemCount = (

 

int)e.OutputParameters["totalRows"];

 

}

 

}

}



TellerDataObjects.cs:

 

using

 

 

System;

 

 

 

 

using

 

 

System.Collections.Generic;

 

 

 

 

using

 

 

System.ComponentModel;

 

 

 

 

using

 

 

System.Diagnostics.Contracts;

 

 

 

 

using

 

 

TellerDataAccess;

 

 

 

 

using

 

 

System.Linq;

 

 

 

 

using

 

 

System.Web.UI.WebControls;

 

 

 

 

namespace

 

 

TellerBL

 

{

[

 

DataObjectAttribute]

 

 

 

public static class TellerDataObjects

 

 

 

 

 

{

[

 

DataObjectMethodAttribute(DataObjectMethodType.Select, false)]

 

 

 

public static IHeaderInfo GetHeaderInfo(string mspDataConnectString, string loanNumber, out DataErrors errorCode)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(loanNumber));

 

errorCode =

 

DataErrors.None;

 

 

 

IHeaderInfo hi = null;

 

 

 

try

 

 

 

 

 

{

 

 

List<IGeneralLoanInfo> gli = TellerBusinessLogic.GetGeneralLoanInfo(mspDataConnectString, loanNumber);

 

 

 

if (gli != null && gli.Count > 0)

 

{

 

 

HeaderInfo hi2 = new HeaderInfo();

 

hi2.LoanNumber = loanNumber;

hi2.BankruptcyStop = gli[0].BankruptcyStop;

hi2.BillingCityAndState = gli[0].BillingCityAndState;

hi2.BillingStreetAddress = gli[0].BillingStreetAddress;

hi2.BorrowerName = gli[0].BorrowerName;

hi2.BorrowerSSN = gli[0].MortgagorSSN;

hi2.CoBorrowerName = gli[0].CoBorrowerName;

hi2.CoBorrowerSSN = gli[0].CoMortgagorSSN;

hi2.DelinquentBalance = (gli[0].DelinquentBalance.HasValue ? gli[0].DelinquentBalance.Value :

 

decimal.Zero);

 

hi2.ForeclosureStop = gli[0].ForeclosureStop;

hi2.LastApplied = gli[0].LastFullPaymentDate;

hi2.LateCharges = gli[0].LateCharges;

hi2.NextPaymentDueDate = gli[0].Duedate;

hi2.OtherFees = (gli[0].OtherFees.HasValue ? gli[0].OtherFees.Value :

 

decimal.Zero);

 

hi2.PhoneNumber = gli[0].FstTelephoneNo;

hi2.PhoneNumber2 = gli[0].SecTelephoneNo;

hi2.PropertyCity = gli[0].PropertyCity;

hi2.PropertyState = gli[0].PropertyState;

hi2.PropertyStreet = gli[0].PropertyStreet;

hi2.PropertyZipCode = gli[0].PropertyZip;

hi2.TotalMonthlyPayment = gli[0].TotalPayment;

hi2.ZipCode = gli[0].Zipcode;

hi = hi2

 

as IHeaderInfo;

 

}

}

 

 

catch

 

 

 

 

 

{ errorCode =

 

DataErrors.UnknownErrorPleaseRetry; }

 

 

 

return hi;

 

}

[

 

DataObjectMethodAttribute(DataObjectMethodType.Select, false)]

 

 

 

public static List<ILoanSearch> SearchByName(out int totalRows, string mspDataConnectString, string clientCode, string firstName, string lastName, string SortColumns, int startRowIndex, int maximumRows)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(clientCode));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(lastName));

 

 

 

List<ILoanInfoSearchResult> l = TellerBusinessLogic.SearchByName(mspDataConnectString, clientCode, firstName, lastName);

 

totalRows = l.Count;

 

 

List<ILoanSearch> l2 = l.OrderBy(x => x.BorrowerName).Select(x => new LoanSearch(x)).Skip(startRowIndex).Take(maximumRows).ToList<ILoanSearch>();

 

 

 

return l2;

 

}

[

 

DataObjectMethodAttribute(DataObjectMethodType.Select, false)]

 

 

 

public static int SearchByNameCount(string mspDataConnectString, string clientCode, string firstName, string lastName)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(clientCode));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(lastName));

 

 

 

List<ILoanInfoSearchResult> l = TellerBusinessLogic.SearchByName(mspDataConnectString, clientCode, firstName, lastName);

 

 

 

return l.Count;

 

}

[

 

DataObjectMethodAttribute(DataObjectMethodType.Select, false)]

 

 

 

public static List<ILoanSearch> SearchByAddress(out int totalRows, string mspDataConnectString, string clientCode, string houseNumber, string street, string city, string state, string zipCode, string SortColumns, int startRowIndex, int maximumRows)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(street));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(state));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(city));

 

 

 

List<ILoanInfoSearchResult> l = TellerBusinessLogic.SearchByAddress(mspDataConnectString, clientCode, houseNumber, street, city, state, zipCode);

 

totalRows = l.Count;

 

 

return l.Select(x => new LoanSearch(x)).OrderBy(x => x.PropertyAddress).Skip(startRowIndex).Take(maximumRows).ToList<ILoanSearch>();

 

}

[

 

DataObjectMethodAttribute(DataObjectMethodType.Select, false)]

 

 

 

public static int SearchByAddressCount(string mspDataConnectString, string clientCode, string houseNumber, string street, string city, string state, string zipCode)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(street));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(state));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(city));

 

 

 

List<ILoanInfoSearchResult> l = TellerBusinessLogic.SearchByAddress(mspDataConnectString, clientCode, houseNumber, street, city, state, zipCode);

 

 

 

return l.Count;

 

}

}

}

 

 



TellerBusinessLogic.cs:

 

using

 

 

System;

 

 

 

 

 

using

 

 

System.Collections.Generic;

 

 

 

 

 

using

 

 

System.Linq;

 

 

 

 

 

using

 

 

System.Text;

 

 

 

 

 

using

 

 

System.Diagnostics.Contracts;

 

 

 

 

 

using

 

 

TellerDataAccess;

 

 

 

 

 

using

 

 

System.Data;

 

 

 

 

 

using

 

 

System.ComponentModel;

 

 

 

 

 

using

 

 

DMI.Crypto;

 

 

 

 

 

using

 

 

DMI.UserManagement;

 

 

 

 

 

using

 

 

VHIWebSite;

 

 

 

 

 

using

 

 

DMI.VHI.TellerApp;

 

 

 

 

 

using

 

 

System.Configuration;

 

 

 

 

 

using

 

 

VHIDataAccess;

 

 

 

 

 

namespace

 

 

TellerBL

 

{

 

 

public static class TellerBusinessLogic

 

 

 

 

 

 

{

 

 

internal static List<ILoanInfoSearchResult> SearchByName(string mspDataConnectString, string clientCode, string firstName, string lastName)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(clientCode));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(lastName));

 

 

 

return SearchDA.SearchByName(mspDataConnectString, clientCode, firstName, lastName).ToList<ILoanInfoSearchResult>();

 

}

 

 

internal static List<ILoanInfoSearchResult> SearchByAddress(string mspDataConnectString, string clientCode, string houseNumber, string street, string city, string state, string zipCode)

 

{

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(mspDataConnectString));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(street));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(state));

 

 

 

Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(city));

 

 

 

return SearchDA.SearchByAddress(mspDataConnectString, clientCode, houseNumber, street, city, state, zipCode).ToList<ILoanInfoSearchResult>();

 

}

}

}

K
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
69 views
Hello friends, i have a issue in Rad DatePicker in IE8.
when i launch the screen in IE browser, the date picker sets currrent date and time.
in IE browser, the datepicker  is overlapped and it is not visible the datetime clearly. but in other browser the datetime is clearly visible.
screen shots
1. IE8
2. other browser
what to do the clear this issue.
thanks in advances
S.Rajkumar
Martin
Telerik team
 answered on 11 Apr 2012
1 answer
139 views
I am using Telerik 2012_1_215 version of RadScheduler with a custom db provider. I have a question regarding reminders. I understand that 'Snooze' just delays the reminder for the current user but dismiss should stop the reminder completely, correct? Do I need to explicitly delete the content in the reminder field for that appointment.ID in my database? Or does the scheduler somehow do this automatically when using the custom provider?

Thanks in advance,
C
Peter
Telerik team
 answered on 11 Apr 2012
5 answers
338 views
Hallo,

in the table editor dialog one can select several CSS styles for the table design. Is it possible to change these templates? For our scenario it would be great if we could set the style of a table by default and not allow any changes to the initial style.

I'd appreciate any suggestions on how to accomplish this.

Thanks,
Phil
Rumen
Telerik team
 answered on 11 Apr 2012
1 answer
103 views
I have my grid automatically kicked into edit mode for all rows when it loads. I have a dropdown list that is populated successfully for the 1st row but the subsequent rows aren't displayed properly, it only states the name of the object for each value in the dropdown list, please see this image for what i mean. Here is my code for populating the dropdowns:

if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            //for edit mode
            string selectedCommentIndex = "";
            GridEditableItem item = e.Item as GridEditableItem;
            GridEditManager editMan = item.EditManager;
 
            GridDropDownListColumnEditor commenteditor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("Action"));
            GridDropDownColumn testing = e.Item.OwnerTableView.Columns.FindByUniqueName("Action") as GridDropDownColumn;
 
             
                var comments = (from c in db.Entered_Comments
                                where c.type_id == 2
                                select c).ToList();
 
                 
 
                commenteditor.DataSource = comments;
                commenteditor.DataTextField = "description";
                commenteditor.DataValueField = "comment_id";
                commenteditor.DataBind();
                commenteditor.Visible = true;
                commenteditor.ComboBoxControl.SelectedValue = selectedCommentIndex;
                commenteditor.DropDownListControl.SelectedValue = selectedCommentIndex;
                commenteditor.ComboBoxControl.AllowCustomText = true;
                commenteditor.ComboBoxControl.EmptyMessage = Resources.DataEntry_ResultEntryByTestPracticeResource.commenteditorComboBoxControlEmptyMessage;
                commenteditor.ComboBoxControl.Filter = RadComboBoxFilter.Contains;
                commenteditor.ComboBoxControl.CssClass = "rcbDropDown";
            
}



Johny
Top achievements
Rank 1
 answered on 11 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?