HI Telerik Team,
i am using Hierarchical grid with custum filtering.
the problem i am facing is something like this:
when i filter something in the grid and server returns the results the grid is not re-painted properly with the search results although the results returned are correct. when i use rebind method then in that case it paints the results properly but then the drill down button is throwing problem i.e.
"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. "
In Short i can say how to refresh the Grid without using rebind, in my case both the requests
Filter and drill down are post requests so i use isPostBack to check the request type
"Filter" works with rebind but "Drill Down" does not work with post back.
please tell me how to get out of this hassle. i have seen all the example given on your web site but could not find anything related to my scenrio.
here is the code for the code behind:
public partial class BookRunOffBank : ViewPage
{
public AjaxOptions options = new AjaxOptions();
protected void Page_Load(object sender, EventArgs e)
{
options.UpdateTargetId = "page";
RadGrid1.PagerStyle.Position =
GridPagerPosition.TopAndBottom;
RadGrid1.MasterTableView.DataSource = ViewData["Companies"];
//////
//if i remove this method then drill down works but filter results are not painted...
//////
if (this.IsPostBack)
RadGrid1.Rebind();
}
protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
e.DetailTableView.DataSource = ViewData[
"CompanyBookRunOff"];
}
}
looking for your reply very soon.
thanks.
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSlider, {"_decreaseText":"Decrease","_dragText":"Drag","_increaseText":"Increase","_skin":"Web20","_uniqueID":"CoreCompetencyRadGrid$ctl00$ctl04$EmployeeRatingSlider","_value":1,"clientStateFieldID":"CoreCompetencyRadGrid_ctl00_ctl04_EmployeeRatingSlider_ClientState","length":206,"maximumValue":6,"minimumValue":1,"selectionEnd":1,"selectionStart":1,"showDecreaseHandle":false,"showIncreaseHandle":false,"trackMouseWheel":false,"value":1}, {"valueChange":clientValueChangeCoreCompetencyRadGrid_ctl00_ctl04_EmployeeRatingSlider}, null, $get("CoreCompetencyRadGrid_ctl00_ctl04_EmployeeRatingSlider")); |
| }); |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head id="Head1" runat="server"> |
| <title>Untitled Page</title> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <asp:ScriptManager ID="ScriptManager" runat="server" /> |
| <script type="text/javascript"> |
| function updateRatingLabel(sliderValue, target) { |
| // kind of a hack |
| var values = new Array(); |
| values[1] = "Needs Rating"; |
| values[2] = "Not Rated"; |
| values[3] = "Lacking"; |
| values[4] = "Attaining"; |
| values[5] = "Excelling"; |
| values[6] = "Mastering"; |
| var target = document.getElementById(target); |
| target.innerHTML = values[sliderValue]; |
| } |
| </script> |
| <telerik:RadGrid ID="CoreCompetencyRadGrid" runat="server" AutoGenerateColumns="false" |
| CssClass="" EnableEmbeddedSkins="false" GridLines="none" Width="100%" OnItemDataBound="CoreCompetencyRadGrid_ItemDataBound" |
| OnNeedDataSource="CoreCompetencyRadGrid_NeedDataSource" SkinID="Grid"> |
| <GroupHeaderItemStyle /> |
| <MasterTableView> |
| <GroupHeaderItemStyle /> |
| <ExpandCollapseColumn Visible="False"> |
| <HeaderStyle Width="19px" /> |
| </ExpandCollapseColumn> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="Rating" UniqueName="Rating"> |
| <ItemTemplate> |
| <div style="margin: 0; height: 5px;"> |
| </div> |
| <div id="employeeSlider" runat="server"> |
| <telerik:RadSlider ID="EmployeeRatingSlider" runat="server" Length="206" MinimumValue="1" |
| MaximumValue="6" ShowDecreaseHandle="false" ShowIncreaseHandle="false" Skin="Web20" |
| OnClientValueChange="clientValueChange" SlideStep="1" TrackMouseWheel="false" /> |
| </div> |
| <div> |
| <asp:Label ID="employeeRatingLabel" runat="server" Style="">HELLO</asp:Label> |
| </div> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:Button ID="Yo" runat="server" /> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| using Telerik.Web.UI; |
| public partial class Default : System.Web.UI.Page |
| { |
| protected void CoreCompetencyRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
| { |
| string[] data = new String[5] { "a", "a", "a", "a", "a" }; |
| CoreCompetencyRadGrid.DataSource = data; |
| } |
| protected void CoreCompetencyRadGrid_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem dataItem = e.Item as GridDataItem; |
| RadSlider ratingSlider = (RadSlider)dataItem.FindControl("EmployeeRatingSlider"); |
| ratingSlider.OnClientValueChange = "clientValueChange" + ratingSlider.ClientID; |
| Label ratingLabel = (Label)e.Item.FindControl("employeeRatingLabel"); |
| string jsfunction = "function " + ratingSlider.OnClientValueChange + "(obj,args){updateRatingLabel(obj.get_value(),'" + ratingLabel.ClientID + "');};"; |
| Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Script" + ratingSlider.ClientID, jsfunction, true); |
| } |
| } |
| } |
Version=2008.3.1105.20,
thanks,
Jeff

| //this is how it is invoked in my javascript function |
| var radWindowManager= GetRadWindowManager(); |
| var radWindow=radWindowManager.GetWindowByName("RadWindow1"); |
| radWindow.SetUrl(url); |
| radWindow.Show(); |
| <rad:RadWindowManager ID="BudgetsWindowManager" runat="server" Skin="Halcrow" SkinsPath="/RadControls/Window/Skins/" Behavior="Reload,Close,ReSize"> |
| <Windows> |
| <rad:RadWindow ID="RadWindowPackageUpdate" Modal="true" |
| ShowContentDuringLoad="true" runat="server" Width="900" Height="570" Skin="Halcrow" SkinsPath="/RadControls/Window/Skins/" Behavior="Reload,Close,ReSize"/> |
| <rad:RadWindow ID="RadWindow1" runat="server" Skin="HalcrowHelp" VisibleTitlebar="false" VisibleStatusbar="false" Behavior="None" Modal="true" SkinsPath="/RadControls/Window/Skins/" /> |
| </Windows> |
| </rad:RadWindowManager> |
| <rad:RadWindowManager ID="RadWindowManager1" runat="server" Skin="HalcrowHelp" VisibleTitlebar="false" VisibleStatusbar="false" Behavior="None" Modal="true" SkinsPath="/RadControls/Window/Skins/"> |
| </rad:RadWindowManager> |
However when i try to launch a window usin RadWIndowManager1 , it appears that due to multiple instances of RadWIndowManager on the page, it appears to use the skin settins provided for "Halcrow" mentioned in "BudgetsWindowManager" rather than the "HalcrowHelp" provided in the RadWindowManager1. I have tried mergin the Window Managers togather, however setting the skin on the rad window appears to have no effect and the WindowManager Skin always seems to take preference. Is there anyway i can use multiple instances of RadWindowManager to selct he appropriae SKin? I have tried various things to get around this issue including the one below
| <rad:RadWindowManager ID="BudgetsWindowManager" runat="server" Skin="HalcrowHelp" SkinsPath="/RadControls/Window/Skins/" Behavior="Reload,Close,ReSize"> |
| <Windows> |
| <rad:RadWindow ID="RadWindowPackageUpdate" Modal="true" |
| ShowContentDuringLoad="true" runat="server" Width="900" Height="570" Skin="Halcrow" SkinsPath="/RadControls/Window/Skins/" Behavior="Reload,Close,ReSize"/> |
| <rad:RadWindow ID="RadWindow1" runat="server" Skin="HalcrowHelp" VisibleTitlebar="false" VisibleStatusbar="false" Behavior="None" Modal="true" SkinsPath="/RadControls/Window/Skins/" /> |
| </Windows> |
| </rad:RadWindowManager> |
but to no avail. Can ayone help please?
Thanks