Hi I am using web data grid with webAsyncRefreshPanelI have assigned datasource to grid inside content refreshevent
I am getting below error
Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'webNWGrid' can't be added to the application.
Can anybody facing the same issue?
Please help me out to fix this issue
cs page code
protected
void wrappnlGrid_ContentRefresh(object sender, EventArgs e)
{
if (hdnSaveOrBuild.Value == "BuildGrid")
int AccountId = Convert.ToInt32(ddlAccounts.SelectedValue);
int YearId = Convert.ToInt32(ddlYear.SelectedValue);
int VersionId = Convert.ToInt32(ddlVersion.SelectedValue);
int DimensionId = Convert.ToInt32(ddlDimension.SelectedValue);
int UnitId = Convert.ToInt32(ddlUnit.SelectedValue);
string Template = ddlTemplate.SelectedValue;
string IdList = string.Empty;
if (ddlTemplate.SelectedValue == "Account")
IdList = hdnEntityValue.Value;
}
else if (ddlTemplate.SelectedValue == "Unit")
IdList = hdnAccountValue.Value;
bool IsTotalVisible = chkShowTotal.Checked;
DataTable dtGrid = null;
dtGrid = GetData(AccountId, YearId, VersionId, DimensionId, UnitId, Template, IdList);
//CreateTable(dtGrid);
webNWGrid.ClearDataSource();
webNWGrid.DataSource = dtGrid;
webNWGrid.DataBind();
ASPX Page
<
script type ="text/javascript">
function
BuildGrid(SaveOrBuild)
var hdnSaveOrBuild=document.getElementById('hdnSaveOrBuild')
if(hdnSaveOrBuild!=null)
hdnSaveOrBuild.value=SaveOrBuild;
var AccountID=document.getElementById('ddlAccounts').value;
var YearID=document.getElementById('ddlYear').value;
var VersionId=document.getElementById('ddlVersion').value;
var DimensionId=document.getElementById('ddlDimension').value;
var UnitId=document.getElementById('ddlUnit').value;
var Template=document.getElementById('ddlTemplate').value;
var IsTotalVisible= document.getElementById('chkShowTotal').checked;
var IdList;
if(Template=='Unit')
//IdList=document.getElementById('ob_cboAccountHidden').value;//cboAccount.getValue();
IdList=document.getElementById(
"txtAccount").getAttribute('ids');
//alert('IdList');
var hidden = document.getElementById('hdnAccountValue');
if (hidden != null)
hidden.value = IdList;
else
//alert('UnitA');
//IdList=document.getElementById('ob_cboEntityHidden').value;//cboEntity.getValue();
"txtEntity").getAttribute('ids');
var hidden = document.getElementById('hdnEntityValue');
var warp = ig$("wrappnlGrid");
//alert(warp);
if(!warp)
return;
warp.refresh();
</script
>
="text-align: center;">
="wrappnlGrid_ContentRefresh">
="100%">
="Single">
/>
Hello,
The Microsoft AJAX Update Panel should be used in place of the WebAsyncRefreshPanel when using any of the ASP.NET AJAX controls. The following is from the known issues in the help:
"In order to maximize performance and compatibility, the Infragistics ASP.NET AJAX web controls should not be used together with the NetAdvantage ASP.NET WebAsyncRefreshPanel; instead, it is suggested that you use the Microsoft ASP.NET AJAX Update Panel. The performance and compatibility gain is a result of the Infragistics ASP.NET AJAX controls and the Update Panel both being built upon the Microsoft AJAX Extensions which allows both to excel together due to their commonly shared code base. "
Let me know if you have any questions with this matter.