

| <div style="width:700px"> |
| <telerik:RadTreeView runat="server" ID="RadTreeView1"> |
| <NodeTemplate> |
| <div style="text-align:left; width:20%; float:left"> |
| <asp:Label ID="Label1" isText="true" runat="server" Text='<%# Container.Attributes["Text"] %>' /> |
| </div> |
| <div style="text-align:right; width:80%; float:right"> |
| <asp:LinkButton ID="lbtnAdd" runat="server" Text="Add" CommandName="Add" CssClass="Link" OnClick="lbtnAdd_Click"/> |
| <asp:LinkButton ID="lbtnEdit" runat="server" Text="Edit" CommandName="Edit" CssClass="Link" OnClick="lbtnEdit_Click"/> |
| <asp:LinkButton ID="lbtnDelete" runat="server" Text="Delete" CommandName="Delete" CssClass="Link" OnCommand="lbtnDelete_Click"/> |
| </div> |
| </NodeTemplate> |
| </telerik:RadTreeView> |
| </div> |
function onCustomerAddress_Loaded(result) {
try {
var rows = result.rows[0];
if (rows != null) {
$get(
'<%=txtHCZipCode.ClientID %>').value = rows.ZIPCODE;
$get(
'<%=txtHCStreet.ClientID %>').value = rows.STREET;
$get(
'<%=txtHCZipCode.ClientID %>').disabled = true;
$get(
'<%=txtHCStreet.ClientID %>').disabled = true;
if ($find('<%=cmbHCCountry.ClientID %>').findItemByValue(rows.COUNTY) != null) {
//$find('<%=cmbHCCountry.ClientID %>').clearSelection();
$find(
'<%=cmbHCCountry.ClientID %>').updateClientState();
$find(
'<%=cmbHCCountry.ClientID %>').findItemByValue(rows.COUNTY).select();
//$find('<%=cmbHCCountry.ClientID %>').commitChanges();
$find(
'<%=cmbHCCountry.ClientID %>').disable();
}
else if ($find('<%=cmbHCCountry.ClientID %>').findItemByText("Select") != null) {
$find(
'<%=cmbHCCountry.ClientID %>').clearSelection();
$find(
'<%=cmbHCCountry.ClientID %>').findItemByText("Select").select();
}
if ($find('<%=cmbHCState.ClientID %>').findItemByValue(rows.STATE) != null) {
//$find('<%=cmbHCState.ClientID %>').clearSelection();
$find(
'<%=cmbHCState.ClientID %>').updateClientState()
$find(
'<%=cmbHCState.ClientID %>').findItemByValue(rows.STATE).select();
//$find('<%=cmbHCState.ClientID %>').commitChanges();
$find(
'<%=cmbHCState.ClientID %>').disable();
}
if ($find('<%=cmbHCCity.ClientID %>').findItemByValue(rows.CITY) != null) {
// $find('<%=cmbHCCity.ClientID %>').clearSelection();
$find(
'<%=cmbHCCity.ClientID %>').findItemByValue(rows.CITY).select();
//$find('<%=cmbHCCity.ClientID %>').commitChanges();
$find(
'<%=cmbHCCity.ClientID %>').disable();
}
if ($find('<%=cmbHCLocation.ClientID %>').findItemByValue(rows.location) != null) {
//$find('<%=cmbHCLocation.ClientID %>').clearSelection();
$find(
'<%=cmbHCLocation.ClientID %>').findItemByValue(rows.location).select();
//$find('<%=cmbHCLocation.ClientID %>').commitChanges();
$find(
'<%=cmbHCLocation.ClientID %>').disable();
}
if (rows.PHONE != null) {
$get(
'<%=txtHCPhoneNo.ClientID %>').value = rows.PHONE;
$get(
'<%=txtHCPhoneNo.ClientID %>').disabled = true;
}
}
// if ($get('dvLoading') != null) {
// $get('dvLoading').style.display = 'none';
// }
return false;
}
catch (e) {return false;
}
}
function
HMC_Country_SelectedIndexChanged(sender, args) {
try {
if (locationArray != null) {
var country;
var stateControl;
country = $find(
"<%= cmbHCCountry.ClientID%>").get_value();
stateControl = $find(
"<%= cmbHCState.ClientID%>");
stateControl.clearSelection();
if (stateControl != null) {
stateControl.get_items().clear();
stateControl.commitChanges();
comboItem =
new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(
"Select");
comboItem.set_value(
"");
stateControl.get_items().add(comboItem);
for (var rowIndex = 0; rowIndex < locationArray.rows.length; rowIndex++) {
if (locationArray.rows[rowIndex].crm_sug_country == country) {
if (stateControl.findItemByValue(locationArray.rows[rowIndex].crm_sug_state_code) == null) {
comboItem =
new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(locationArray.rows[rowIndex].crm_sug_state);
comboItem.set_value(locationArray.rows[rowIndex].crm_sug_state_code);
stateControl.get_items().add(comboItem);
}
}
}
stateControl.commitChanges();
if (stateControl.findItemByText("Select") != null) {
stateControl.findItemByText(
"Select").select();
}
}
}
return false;
}
catch (e) {return false;
}
}
Please help....
Thanks & Regards
Brijendra Pandey


Thanks!