c# - Filtering RadGrid by ComboBox -
My problem is that when I try to click the cambode inside my Radgrid, it does nothing .
& lt; Telerik: Permalink "RadGrid" runat = "server" DataSourceID = "TestReleaseInformationSource" ShowStatusBar = "true" OnItemCommand = "RadGridItemCommand" OnRender = "Radgrid_prerender" Allow DisabledMatic Exceptions = "True" EnableLinqExpressions = "false" AllowautomaticDelatases = "True "Allow paging =" correct "Autogrentech column =" false "allow filteringBickle column =" true "& gt; & Lt; MasterTableView DataKeyNames = "PrimaryKey" & gt; & Lt; Columns & gt; & Lt; Telerich: Allow gridbound columnsFiltering = "True" Unique name = "TeacherLostname" DataField = "TeacherLostname" header text = "last name" & gt; & Lt; FilterTemplate & gt; & Lt; Telerik: RadComboBox id = "radComboBoxLastName" DataSourceID = "TeacherLastNameDDL" DataTextField = "TeacherLastName" DataValueField = "TeacherLastName" AppendDataBoundItems = "Selected" value = '& lt;% # ((GridItem) Container). OwnerTableView.GetColumn ("TeacherLlastName ") .CurrentFilterValue% & gt; Runat = "server" OnClientSelectedIndexChanged = "TeacherLastNameChanged" & gt; & Lt; Items & gt; & Lt; Telerik: RadComboBoxItem text = "All" selected = "true" /> & Lt; / Item & gt; & Lt; / Telerik: RadComboBox & gt; & Lt; Taylor: RadScriptBlock ID = "RadScriptBlock1" runat = "server" & gt; & Lt; Script type = "text / javascript" & gt; Function teacherLlastNameChanged (sender, args) {var tableView = $ find ("& lt;% # ((GridItem) container) .OwnerTableView.ClientID%>"); TableView.filter ("TeacherLlastName", args.get_item (). Get_value (), "Equality"); } & Lt; / Script & gt; & Lt; / Telerik: RadScriptBlock> & Lt; / FilterTemplate & gt; & Lt; / Telerik: GridBoundColumn & gt; on the grid prerender
protected zero RadGrid_PreRender (object sender, EventArgs e) {if (RadGrid.EditItems.Count> gt; 0) {GridNestedViewItem Item = (grid nested viittom) radgrid. Mastertableview Getitimes (Griditamtip.Nestedview) [Convert. To INT 32 (Radgrid. Edit indax [0])]; item. View = false; } If (RadGrid.MasterTableView.FilterExpression! = String.Empty) {RefreshCombos (); }} Safe void RefreshCombos () {TestReleaseInformationSource.SelectCommand = TestReleaseInformation.Source.SelectCommand + "WHERE" + RadGrid.MasterTableView.FilterExpression.ToString (); RadGrid.MasterTableView.Rebind (); } I have noticed this for hours and can not understand what the problem is. Any thoughts would be appreciated. If necessary, will post more code.
The solution I got is to set the Rendermode property of the company for the company. I still want a different solution.
Try to create JS tasks: I think they all override each other so Only the last one is active so only he is executed. Also, check JS errors.
Additionally, try filtering the client as shown here. MasterTableView object is best achieved through the get_masterTableView () method of the main grid object.
Comments
Post a Comment