Hi,
I create share point web part with Rad Grid control. Here is the code for grid
After that I populate RADGrid with listitemcollection based on sharepoint list. I do that on button event
After button clicking I create some grouping on my grid but data source is null. If I click on button again I have what I need (grouping)
After that I can make drill up and drill down without problems but I still have issue that force me to click button before
I see results.
After that I realize that I must bind RAD Grid on every event that happen on drill up and drill down in this case this is postback event.
After that I see results as I expected but when I try to drill up or drill down I have an error.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Please help.
Thanks
I create share point web part with Rad Grid control. Here is the code for grid
<
telerik:RadGrid
ID
=
"gvTasks"
runat
=
"server"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
GridLines
=
"None"
AllowSorting
=
"True"
ShowGroupPanel
=
"True"
>
<
ClientSettings
AllowDragToGroup
=
"True"
AllowExpandCollapse
=
"false"
>
</
ClientSettings
>
<
MasterTableView
>
<
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
=
"Title"
FilterControlAltText
=
"Filter column column"
HeaderText
=
"Naslov"
UniqueName
=
"column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task_x0020_priority"
FilterControlAltText
=
"Filter column1 column"
HeaderText
=
"Prioritet"
UniqueName
=
"column1"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task_x0020_Status"
FilterControlAltText
=
"Filter column2 column"
HeaderText
=
"Status"
UniqueName
=
"column2"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task_x0020_start_x0020_date"
DataFormatString
=
"{0:d}"
FilterControlAltText
=
"Filter column3 column"
HeaderText
=
"Početak"
UniqueName
=
"column3"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task_x0020_due_x0020_date"
DataFormatString
=
"{0:d}"
FilterControlAltText
=
"Filter column4 column"
HeaderText
=
"Rok"
UniqueName
=
"column4"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Task_x0020__x0025__x0020_complet"
FilterControlAltText
=
"Filter column5 column"
HeaderText
=
"Procenat"
UniqueName
=
"column5"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
></
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
></
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
></
HeaderContextMenu
>
</
telerik:RadGrid
>
protected void btnSearch_Click(object sender, EventArgs e)
{
web = site.OpenWeb();
//QuerySerarch qs = new QuerySerarch();
#region Filtered tasks
SPQuery queryTasks = new SPQuery();
queryTasks.Query = string.Concat(
"<
Where
>" +
// "<
And
>" +
QuerySearch.QueryTaskList(ddProject.SelectedItem.Text, "", "", "", "", "", ""),
// "</
And
>" +
"</
Where
>"
);
SPList listTasks = web.Lists["Project tasks"];
SPListItemCollection itemsTask = listTasks.GetItems(queryTasks);
DataTable ds = itemsTask.GetDataTable();
gvTasks.DataSource = ds;
gvTasks.DataBind(); // List field holding value - first column is called Title anyway!
gvTasks.Visible = true;
#endregion
}
After button clicking I create some grouping on my grid but data source is null. If I click on button again I have what I need (grouping)
After that I can make drill up and drill down without problems but I still have issue that force me to click button before
I see results.
After that I realize that I must bind RAD Grid on every event that happen on drill up and drill down in this case this is postback event.
After that I see results as I expected but when I try to drill up or drill down I have an error.
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Please help.
Thanks