I have 3 RadGrids in a webform to be refresh at the same time,and I Rebind they at the same function, but some one work( the AjaxRequest Handler) and the others do nothing at all.
function
ShowMARC()
{
try
{
grdDetail.AjaxRequest(
"<%= grdDetail.UniqueID %>", "YES");
}
catch(x)
{
alert(x);
}
}
protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string text)
{
base.RaisePostBackEvent(sourceControl, text);
bool showmarc = false;
if (SQL.ToString(text) == "")
showmarc =
SQL.ToBoolean(Session[WebConstant.Web_Global_ShowMARC]);
if (text == "YES")
showmarc =
true;
else if(text == "NO")
showmarc =
false;
int Itemid = SQL.ToInt(Session[WebConstant.Web_Global_ItemidForDetail]);
Session[
WebConstant.Web_Global_ShowMARC] = showmarc;
GridsDataBind(Itemid, showmarc);
}
protected void GridsDataBind(int intItemID, bool showmarc)
{
grdDetail.DataSource =
null;
grdDetail.Rebind();
grdDetail.DataSource = ShowMarc(showmarc);
grdDetail.Rebind();
string strSQLTmp = @" Select t03Identifier, t09LibraryName, t09NickName, t03Location,
t03CallNo as t03CallNo, t03CallNoNormalized, t03CopyBarcode, t03Status, t03DueDate,
Case When t03issueidentifier <= 0 Then t03Volume Else Case
When t72VolumeNo IS NOT NULL AND LTRIM(t72VolumeNo) <> '' Then 'Vol. ' + t72VolumeNo Else '' End +
ISNULL(' Iss. ' + t72IssueNo, '') + ' ' + CONVERT(nvarchar(10), t72MagazineDate, 20) End
As t03Volume, t03issueidentifier , t04FirstName + ' ' + t04LastName CheckoutBy From Copies_t03,libraries_t09,Issue_t72,Patrons_t04
Where t03CheckoutBy *= t04Key And t03IssueIdentifier *= t72Identifier And t09LibraryId = t03LibraryID and t03ItemIdentifier = "
+ intItemID;
string Libraries = "'" + (SQL.ToString(Session[WebConstant.Web_Global_LibraryID])).Replace(",", "','") + "'";
if ((Libraries.EndsWith("'0'")))
{
strSQLTmp = strSQLTmp +
" and t03LibraryID in (" + Libraries + ")";
}
strSQLTmp = strSQLTmp +
@"Order by
ISNULL(Replicate(' ',10-len(ISNULL(t72VolumeNo,''))),'') + ISNULL(t72VolumeNo,''), ISNULL(Replicate('
',10-len(ISNULL(t72IssueNo,''))),'') + ISNULL(t72IssueNo,''), t03Volume "
;
DataTable dt = SQL.ExecuteSQL_fill(strSQLTmp);
grdCopyInformation.DataSource =
null;
grdCopyInformation.Rebind();
grdCopyInformation.DataSource = dt;
grdCopyInformation.Rebind();
Session[
WebConstant.Web_Global_Iteminfomation] = dt;
string PatronKey = (string)Session[WebConstant.Web_Global_PatronKey];
string Sqlstr = @"Select t65ItemIdentifier, t65FileTitle as Title, t65FileType
as FileType, t65AttachFileName as Location, ISNULL(t65CoverImage,0)
t65CoverImage from ItemAttach_t65 where t65ItemIdentifier="
+ intItemID;
dt =
SQL.ExecuteSQL_fill(Sqlstr);
grdMultimedia.DataSource =
null;
grdMultimedia.Rebind();
grdMultimedia.DataSource = dt;
grdMultimedia.Rebind();
Session[
WebConstant.Web_Global_ItemMultimedia] = dt;
}