Hi all I have designed my pivot grid as follows
And my code for binding is as follows
My pivot grid looks as follows
http://imageshack.us/photo/my-images/109/pivoto.jpg/
Can some one help me. Also how can I use edit and delete options in pivot grid
<
telerik:RadPivotGrid
EnableViewState
=
"true"
AllowPaging
=
"true"
PageSize
=
"10"
Width
=
"800px"
ViewStateMode
=
"Inherit"
ID
=
"RadPivotGrid1"
runat
=
"server"
ColumnHeaderZoneText
=
"ColumnHeaderZone"
ShowColumnHeaderZone
=
"true"
ShowDataHeaderZone
=
"False"
OnNeedDataSource
=
"RadPivotGrid1_NeedDataSource"
>
<
ClientSettings
AllowFieldsReordering
=
"True"
>
<
Scrolling
AllowVerticalScroll
=
"True"
ScrollHeight
=
"320px"
/>
</
ClientSettings
>
<
Fields
>
<
telerik:PivotGridRowField
DataField
=
"EmpID"
ZoneIndex
=
"0"
>
</
telerik:PivotGridRowField
>
<
telerik:PivotGridRowField
DataField
=
"PayeeName"
ZoneIndex
=
"1"
>
</
telerik:PivotGridRowField
>
<
telerik:PivotGridColumnField
DataField
=
"BankAccountType"
>
</
telerik:PivotGridColumnField
>
<
telerik:PivotGridAggregateField
DataField
=
"BankRoutingNumber"
>
</
telerik:PivotGridAggregateField
>
<
telerik:PivotGridAggregateField
DataField
=
"BankAccount"
>
</
telerik:PivotGridAggregateField
>
</
Fields
>
<
TotalsSettings
GrandTotalsVisibility
=
"None"
/>
<
ZoneContextMenu
EnableTheming
=
"True"
ID
=
"rpgzcMenu"
>
</
ZoneContextMenu
>
</
telerik:RadPivotGrid
>
And my code for binding is as follows
protected
void
RadPivotGrid1_NeedDataSource(
object
sender, Telerik.Web.UI.PivotGridNeedDataSourceEventArgs e)
{
MySqlConnection con =
new
MySqlConnection(ConfigurationManager.ConnectionStrings[
"sqlcon1"
].ConnectionString);
MySqlCommand cmd =
new
MySqlCommand(
"select EmpID,BankAccountType,PayeeName,BankRoutingNumber,BankAccount,Amount from tblemployeebankdata where EmpID=1021"
, con);
con.Open();
MySqlDataAdapter da =
new
MySqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds =
new
DataSet();
da.Fill(ds);
RadPivotGrid1.DataSource = ds;
}
My pivot grid looks as follows
http://imageshack.us/photo/my-images/109/pivoto.jpg/
Can some one help me. Also how can I use edit and delete options in pivot grid