private void LoadCountryByRegion(out string ErrorMessage) { ErrorMessage = ""; try { RadTreeView tre_Country = (RadTreeView)ddl_Country.Items[0].FindControl("tre_Country"); if (tre_Country != null) { tre_Country.Nodes.Clear(); } IList<Region> _regionList = (new RegionBL()).getAll(); if (_regionList.Count > 0) { foreach (Region _region in _regionList) { RadTreeNode _regionNode = new RadTreeNode(); _regionNode.Text = _region.Title; _regionNode.Value = "region|" + _region.ID.ToString(); _regionNode.ImageUrl = "~/Resources/Images/16x16/Circle_Red.png"; IList<Country> _countryList = _region.Country_List; foreach (Country _country in _countryList) { RadTreeNode _countryNode = new RadTreeNode(); _countryNode.Text = _country.Title; _countryNode.Value = "country|" + _country.ID.ToString(); _countryNode.ImageUrl = "~/Resources/Images/16x16/Circle_Green.png"; _regionNode.Nodes.Add(_countryNode); } tre_Country.Nodes.Add(_regionNode); } } } catch (Exception ex) { ErrorMessage += ex.Message; } }<telerik:RadComboBox ID="ddl_Country" runat="server" ExpandAnimation-Type="None" CollapseAnimation-Type="None" OnClientDropDownOpened="tre_Country_OnClientDropDownOpenedHandler" LoadingMessage="Loading..." EmptyMessage="Please Select Country" Style="vertical-align: middle;" Width="300px" Height="190px" Skin="Office2007" > <ItemTemplate> <telerik:RadTreeView ID="tre_Country" runat="server" ShowLineImages="true" BackColor="#FFFFFF" Height="180px" Width="290px" OnClientNodeClicking="tre_Country_NodeClicking" Skin="Office2007" /> </ItemTemplate> <Items> <telerik:RadComboBoxItem Text="" /> </Items> </telerik:RadComboBox>
radconfirm(text, callBackFunction, 500, 100, null, "Delete Record"
);
I am calling the function on the OnClientClicking
<telerik:RadButton ID="rbtDeleteSetting" runat="server" SkinId="skn_SavedSettings_Delete" EnableViewState="true" OnClientClicking="DeleteOnClientClicking" CommandArgument="Display"/>
Here is the complete function
function DeleteOnClientClicking(sender, args)
{
varcallBackFunction= Function.createDelegate(sender, function(argument)
{
if (argument)
{
this.click();
}
});
vartext = "Are you sure you want to delete these Saved Settings?<br\>This process CANNOT be un-done.<br\>";
radconfirm(text, callBackFunction, 500, 100, null, "Delete Settings");
args.set_cancel(true);
}
int
rowCount = pRgdTrans.Items.Count;
int curRowIdx = 0;
GridDataItem
curTransRow = pRgdTrans.Items[curRowIdx];
//delete row.