This is a migrated thread and some comments may be shown as answers.

Client Side valiadations for Rad controls in User control is not firing

2 Answers 45 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Suja Kanak
Top achievements
Rank 1
Suja Kanak asked on 24 Mar 2010, 02:37 PM
Hello All,

Client Side valiadations for Rad controls in User control is not firing in the aspx page.

Kindly  help.

Regards,
Suja

2 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 24 Mar 2010, 05:56 PM
I would suggest showing us some code that shows how your validating the RadComboBox controls, in order to get help.
0
Suja Kanak
Top achievements
Rank 1
answered on 26 Mar 2010, 05:05 AM
Hi,

Below is the brief description

The Rad combo box in user control

 

<telerik:RadComboBox ID="ddlCustomerName"

 

 

runat="server"

 

 

Width ="300px"

 

 

AllowCustomText="false"

 

 

HighlightTemplatedItems="true"

 

 

 

EnableLoadOnDemand="true"

 

 

OnItemsRequested="ddlCustomerName_ItemsRequested"

 

 

MarkFirstMatch="true"

 

 

AutoPostback="true">

 

 

</telerik:RadComboBox>

 


On Page Load

 

btnSubmit.Attributes.Add(

"OnClick", "return fn_Validation('" & TH1.Customer.ClientID "' );")

In aspx page

Javascript in the aspx page

 

function

 

fn_Validation(Customer)

 

{

 

if(document.getElementById(Customer).selectedIndex==0)

 

{

alert(

'Please select a Customer Name to proceed further')

 

document.getElementById(Customer).focus();

 

return false;

 

}
}
Registered the user control in the aspx as

 

<%

@ Register TagPrefix="uc" TagName="TestHeader" Src="~/UserControl/ParameterSetHeader.ascx" %>

Kindly help.

Tags
ComboBox
Asked by
Suja Kanak
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Suja Kanak
Top achievements
Rank 1
Share this question
or