I'm currently going through updating an application that was using RadGrid.Net2 and RadChart.Net2, to be using the latest release of Telerik ASP.NET AJAX Grid and Chart controls.
So far I've encountered numerous issues with skinning of the Grid, and am now experiencing issues with some of the databinding and controls usage for the grid which I'm hoping you could advise on.
One of the failing instances of the RadGrid used to use the following code:-
<
radG:RadGrid
id
=
"GridOutcomes"
runat
=
"server"
AllowSorting
=
"True"
AllowPaging
=
"True"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
Skin
=
"Default"
OnNeedDataSource
=
"GridOutcomes_NeedDataSource"
OnItemCommand
=
"GridOutcomes_ItemCommand"
OnItemDataBound
=
"GridOutcomes_ItemDataBound"
Visible
=
"False"
>
<
MasterTableView
DataSourcePersistenceMode
=
"NoPersistence"
>
<
Columns
>
<
radG:GridBoundColumn
DataField
=
"ID"
HeaderText
=
"Case"
UniqueName
=
"columnId"
Visible
=
"False"
/>
<
radG:GridTemplateColumn
DataField
=
"GmcCode"
HeaderText
=
"GMC"
UniqueName
=
"columnGMC"
SortExpression
=
"GmcCode"
> <
ItemStyle
HorizontalAlign
=
"Left"
/>
<
HeaderStyle
HorizontalAlign
=
"Left"
/>
<
ItemTemplate
>
<
des:Button
ID
=
"ButtonDrillDown"
runat
=
"server"
CssClass
=
"linkButtonNoValidate showInPrint"
CommandName
=
"DrillDown"
Text='<%#((string)Eval("GmcCode")) + " "%>' CausesValidation="false" />
</
ItemTemplate
>
</
radG:GridTemplateColumn
>
<
radG:GridBoundColumn
DataField
=
"FormattedName"
HeaderText
=
"Name"
UniqueName
=
"columnName"
/>
</
MasterTableView
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
</
radG:RadGrid
>
With the Telerik DLLs updated, I've noticed that the 'DataSourcePersistenceMode' property is no longer valid for the MasterTableView.
Also, when the application runs, clicking on one of the row buttons which calls 'GridOutcomes_ItemCommand' no longer is able to extract the correct value from the grid, and the value returned is the Empty Cell Default Value.
01.
protected
void
GridOutcomes_ItemCommand(
object
source, GridCommandEventArgs e)
02.
{
03.
Logger.Write(User.Identity.Name +
": SearchPersonnel:GridOutcomes_ItemCommand"
, Defines.LoggingCategoryMain);
04.
05.
switch
(e.CommandName)
06.
{
07.
case
"DrillDown"
:
08.
try
09.
{
10.
GridDataItem gridItem = e.Item
as
GridDataItem;
11.
TableCell cell = gridItem[GridOutcomes.Columns[(
int
)GridColumn.PersonnelId].UniqueName];
12.
13.
int
personnelId = 0;
14.
if
(
int
.TryParse(cell.Text,
out
personnelId))
15.
{
16.
ApplicationStore.Instance.SelectedPersonnel =
new
Personnel(
new
PersonnelRecord(), personnelId);
Could you please advise on what I should do to replace the missing DataSourcePersistenceMode property in order to retain the same functionality, and also could you please let me know if you have a guide on migrating from the .Net2 versions of the RadGrid and RadChart to the up to date releases since I'm guessing I'm going to find a lot of issues when I get to testing the chart control.
Thanks,
Jonathan