protected void grdDetailAccount_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
{
e.Canceled = true;
foreach (GridDataItem item in grdDetailAccount.Items)
{
string detailAccountID = grdDetailAccount.MasterTableView.DataKeyValues[e.Item.ItemIndex]["detailAccountID"].ToString();
if (((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text != "")
{
strAccountingDocNo = ((TextBox)item["AccountingDoc1"].FindControl("txtAccountingDoc")).Text;
CDSStockLogic.BusinessObjects.UI.AccountingDocs.updateDetailAccountID(strAccountingDocNo, detailAccountID);
}
}
}
strAccountingDocNo is null but i type value
plz help
Hi All,
RAD Grid scrolling(Horizontal and Vertical) performance in IE6 and IE7 is too slow. We need to show more than thousand records with static header but it's working fine in Fire fox and Safari.

When the treeview tries to do a postback after a node edit with this dynamic code:
__doPostBack(
'ctl00$ContentPlaceHolder1$SectionsTreeView','{"commandName":"NodeEdit","index":"0","nodeEditText":"BRASS%20Monkey"}')
we get a 'Microsoft JScript runtime error: Object expected'
The html for the start of the treeview is
<div id="ctl00_ContentPlaceHolder1_SectionsTreeView" class="RadTreeView RadTreeView_WebBlue">
so the object name seems OK.
What's going wrong and more impartantly how do I fix it?
Hello,
I've installed Visual Web Developer Express 2010 and Telerik ASP .NET Ajax Controls.
I'm trying to follow a tutorial.
At a certain point it says : "Add a RadMenu to the top of the web page."
I guess I have to drag and drop it from the Toolbox ? I think I've already seen someone doing this a year ago.
But my problem is : I have no Telerik's Rad controls in my toolbox and I have no idea how I'm supposed to add them.
Thank you if you can help.
<
telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function CheckAll_CCRLoadChartFilter_Location() {
var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
for (var i = 0; i < chkboxs_Location.length - 1; i++) {
if (document.getElementById(chkboxs_Location[i]) != null) {
document.getElementById(chkboxs_Location[i]).checked = document.getElementById(chkboxs_Location[0]).checked;
}
}
}
function RemoveCheckAll_CCRLoadChartFilter_Location() {
var chkboxs_Location = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var d = $find("<%= ddlLocation.ClientID %>")
d.set_selectedItem(0)
document.getElementById(chkboxs_Location[0]).checked =
false;
}
function SetTextOfTheLocationComboBox_CCRLoadChartFilter(sender, eventArgs) {
var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var selectedLocation = "";
for (var i = 0; i < chkboxsLocation.length - 1; i++) {
var chkedItemLocation = document.getElementById(chkboxsLocation[i]);
var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);
if (chkedItemLocation != null && chkedItemLocation.checked) {
if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {
selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;
sender.set_text(selectedLocation);
return;
}
selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +
",";
}
}
if (selectedLocation == "")
selectedLocation =
"..."
else {
document.getElementById(
"<%= tdLocation.ClientID %>").title = selectedLocation;
if (selectedLocation.length > 25) {
selectedLocation = selectedLocation.substring(0, 22) +
"...";
}
}
sender.set_text(selectedLocation);
}
function SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close(sender, eventArgs) {
var chkboxsLocation = Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs.split(",");
var selectedLocation = "";
for (var i = 0; i < chkboxsLocation.length - 1; i++) {
var chkedItemLocation = document.getElementById(chkboxsLocation[i]);
var chkedItem_All_Location = document.getElementById(chkboxsLocation[0]);
if (chkedItemLocation != null && chkedItemLocation.checked) {
if (chkedItem_All_Location != null && chkedItem_All_Location.checked) {
selectedLocation = chkedItem_All_Location.nextSibling.firstChild.data;
sender.set_text(selectedLocation);
return;
}
selectedLocation = selectedLocation + chkedItemLocation.nextSibling.firstChild.data +
",";
}
}
if (selectedLocation == "")
selectedLocation =
"..."
else {
document.getElementById(
"<%= tdLocation.ClientID %>").title = selectedLocation;
if (selectedLocation.length > 25) {
selectedLocation = selectedLocation.substring(0, 22) +
"...";
}
}
sender.set_text(selectedLocation);
}
</script>
</
telerik:RadScriptBlock>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel11">
<table width="235px" dir="rtl" style="text-align: left">
<tr>
<td>
<telerik:RadComboBox Width="100%" ID="ddlLocation" runat="server" Skin="Office2007"
MaxHeight="150px" AutoPostBack="true" CausesValidation="false" OnItemDataBound="ddlLocation_ItemDataBound"
OnClientSelectedIndexChanged="SetTextOfTheLocationComboBox_CCRLoadChartFilter_Close" OnSelectedIndexChanged="ddlLocation_OnSelectedIndexChanged"
OnClientLoad="SetTextOfTheLocationComboBox_CCRLoadChartFilter">
<ItemTemplate>
<asp:CheckBox ID="chkDropLocationItem_CCRLoadChartFilter" AutoPostBack="false" Checked="true"
runat="server" Text='<%# Eval("Value")%>' />
<asp:HiddenField ID="hdnDropLocationItem_CCRLoadChartFilter" runat="server" Value='<%# Eval("Key")%>' />
</ItemTemplate>
<CollapseAnimation Type="OutQuint" Duration="0"></CollapseAnimation>
</telerik:RadComboBox>
</td>
</tr>
</table>
</
telerik:RadAjaxPanel>
* on .CS
protected override void OnPreRender(EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "Register_CCRLoadChart_checkBoxsLocation_ID", "<script> var Chart_CCRLoadChartFilter_CheckBoxsLocation_IDs='" + CheckBoxesLocationIds + "';</script>", false);
base.OnPreRender(e);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
FillLocationLookup();
}
}
protected
void ddlLocation_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
{
CheckBox chk = e.Item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;
if (chk != null)
{
if (e.Item.Index == 0)
chk.Attributes[
"onClick"] = "CheckAll_CCRLoadChartFilter_Location()";
else
chk.Attributes[
"onClick"] = "RemoveCheckAll_CCRLoadChartFilter_Location()";
if (!CheckBoxesLocationIds.Contains(chk.ClientID))
CheckBoxesLocationIds += chk.ClientID +
",";
}
}
protected void ddlLocation_OnSelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
List<String> selectedLocation = new List<String>();
foreach (RadComboBoxItem item in ddlLocation.Items)
{
CheckBox chk = item.FindControl("chkDropLocationItem_CCRLoadChartFilter") as CheckBox;
HiddenField hdnField = item.FindControl("hdnDropLocationItem_CCRLoadChartFilter") as HiddenField;
if (chk != null && hdnField != null && chk.Checked && !String.IsNullOrEmpty(hdnField.Value))
{
if (hdnField.Value == Constants.AllLocation_Key)
{
selectedLocation.Add(
Constants.AllLocation_Key);
break;
}
else
{
selectedLocation.Add(hdnField.Value);
}
}
}
FilterParameters filterParameters = (((IAdvanceSearch)Page).Parameters);
List<string> courts = filterParameters.Courts; ;
CourtNodeTree courtNameTree = FiltersManager.CurrentUserCourtNodeTree.GetCourtNameTree(courts.ToArray());
List<LookupItem> lookupCourtType = new List<LookupItem>();
string[] classification = new string[1];
classification[0] = filterParameters.Classificaton;
lookupCourtType = courtNameTree.GetCourtTypeNodes(selectedLocation.ToArray(), classification);
if (lookupCourtType.Count > 0)
{
lookupCourtType.Sort(
new LookupItemComparer());
lookupCourtType.Insert(0,
new LookupItem(Constants.AllCourtsType_Key, Constants.AllCourtsType_Value));
FillDropDown(lookupCourtType, ddlCourtType);
}
else
{
ddlCourtType.Items.Clear();
ddlCourtType.ClearSelection();
}
}
yours comments and fix will be highly apprieciated,
Regards,
Samar hamdan.