All,
I am having an issue displaying data in my grid using Telerik AJAX controls v. 2010.3.1317.35. I have no idea why, as numerous other grids in other user controls on the same page are displaying fine. I can see in my NeedDataSource event that the oARAC collection object has data, and that the column name in the query is correct in the grid column. I can also see the grid shows 2 empty rows, so for some reason the grid is interpreting the data "4999220" as
I have confirmed that the NeedDataSource event is not firing twice when loaded, and I am not getting any exceptions.
Below is the code, and attached are the images of what is going on as I debug.
Any and all help is greatly appreciated!
Thanks,
Bruce
I am having an issue displaying data in my grid using Telerik AJAX controls v. 2010.3.1317.35. I have no idea why, as numerous other grids in other user controls on the same page are displaying fine. I can see in my NeedDataSource event that the oARAC collection object has data, and that the column name in the query is correct in the grid column. I can also see the grid shows 2 empty rows, so for some reason the grid is interpreting the data "4999220" as
I have confirmed that the NeedDataSource event is not firing twice when loaded, and I am not getting any exceptions.
Below is the code, and attached are the images of what is going on as I debug.
Any and all help is greatly appreciated!
Thanks,
Bruce
protected
void
rgApplications_NeedDataSource(
object
sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
LaundryLogicDAL.ARApplicationsCollection oARAC =
new
LaundryLogicDAL.ARApplicationsCollection();
LaundryLogicDAL.ARApplicationsQuery oARAQ =
new
LaundryLogicDAL.ARApplicationsQuery(
"ara"
);
LaundryLogicDAL.ARCreditsQuery oARCQ =
new
LaundryLogicDAL.ARCreditsQuery(
"arc"
);
LaundryLogicDAL.ARDebitsQuery oARDQ =
new
LaundryLogicDAL.ARDebitsQuery(
"ard"
);
try
{
oARAC.es.Connection.Name =
"NAS"
;
oARAC.es.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
oARAQ.es2.Connection.Name =
"NAS"
;
oARAQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
oARCQ.es2.Connection.Name =
"NAS"
;
oARCQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
oARDQ.es2.Connection.Name =
"NAS"
;
oARDQ.es2.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
oARAQ.Select(
oARCQ.CreditIdentifier,
oARCQ.CreditDate,
oARCQ.OriginalAmount.As(
"CreditAmount"
),
oARAQ.ApplicationDate,
oARAQ.Amount.As(
"ApplicationAmount"
),
oARAQ.Notes.As(
"ApplicationNotes"
),
oARDQ.DebitIdentifier,
oARDQ.DebitDate,
oARDQ.OriginalAmount.As(
"DebitAmount"
)
);
oARAQ.InnerJoin(oARCQ).On(
oARAQ.CreditID == oARCQ.Id);
oARAQ.InnerJoin(oARDQ).On(
oARAQ.DebitID == oARDQ.Id);
//if (Session["DebitID"] != null)
if
(ViewState[
"DebitID"
] !=
null
&& (
int
)ViewState[
"DebitID"
] >= 0)
{
oARAQ.Where(
//oARAC.Query.DebitID == (int)Session["DebitID"]
oARAQ.DebitID == (
int
)ViewState[
"DebitID"
]
);
}
else
if
(ViewState[
"CreditID"
] !=
null
&& (
int
)ViewState[
"CreditID"
] >= 0)
{
oARAQ.Where(
//oARAC.Query.DebitID == (int)Session["DebitID"]
oARAQ.DebitID == (
int
)ViewState[
"CreditID"
]
);
}
if
(oARAC.Load(oARAQ))
{
rgApplications.DataSource = oARAC;
}
else
{
rgApplications.DataSource =
new
object
[0];
}
}
catch
(Exception ex)
{
rgApplications.DataSource =
new
object
[0];
DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(
this
, ex);
}
finally
{
oARAC.Dispose();
oARAC =
null
;
oARAQ =
null
;
oARCQ =
null
;
oARDQ =
null
;
}
}
<
telerik:RadGrid
ID
=
"rgApplications"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowPaging
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
OnNeedDataSource
=
"rgApplications_NeedDataSource"
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
<
MasterTableView
AllowMultiColumnSorting
=
"True"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"CreditIdentifier"
FilterControlAltText
=
"Filter CreditIdentifier column"
HeaderText
=
"Credit ID"
UniqueName
=
"CreditIdentifier"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>