Hello,
I saw many posts with issues on filters, but none of them looks similar to my issue.
The classic filter works perfectly but the Checklist filter doesn't. If I try Combined, the classic functionnality works and the checklist doesn't.
Please note that I tried to change the binding way for my grid (using the NeedDataSource event), but it doesn't change anything. The classic filter is still working while the checklist filter still doesn't.
Here is some part (that I think pertinent) of my code. I generate everything from code behind in the Page_Load method:
var grid = new RadGrid();grid.DataSourceID = myDataSource;grid.AllowPaging = false;grid.ColumnCreated += Grid_ColumnCreated;grid.AutoGenerateColumns = true;grid.AllowFilteringByColumn = true;grid.FilterType = GridFilterType.Combined;grid.FilterCheckListItemsRequested += Grid_FilterCheckListItemsRequested;grid.ClientSettings.Scrolling.AllowScroll = true;grid.ClientSettings.Scrolling.UseStaticHeaders = true;grid.MasterTableView.TableLayout = GridTableLayout.Auto;grid.ItemCommand += Grid_ItemCommand;
protected void Grid_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e){ RadGrid grid = sender as RadGrid; if (e.Column is GridBoundColumn) { GridBoundColumn column = (GridBoundColumn) e.Column; column.AutoPostBackOnFilter = true; column.FilterCheckListEnableLoadOnDemand = true; column.CurrentFilterFunction = GridKnownFunction.Contains; }}private void Grid_FilterCheckListItemsRequested(object sender, GridFilterCheckListItemsRequestedEventArgs e) { string dataField = (e.Column as IGridDataColumn).GetActiveDataField(); var grid = sender as RadGrid; var ds = grid.DataSourceObject as SqlDataSource; Regex reg = new Regex("FROM(.+)ORDER"); string request = "SELECT DISTINCT t." + dataField + " " + reg.Match(ds.SelectCommand).Value + " BY t." + dataField + " ASC"; e.ListBox.DataSource = GetFilterTable(request); e.ListBox.DataKeyField = dataField; e.ListBox.DataTextField = dataField; e.ListBox.DataValueField = dataField; e.ListBox.DataBind(); }
The FilterCheckListItemsRequested is working and I have, for each columns, 1 checkbox for each different values inside. Notice however how I had to make a Regex on the SelectCommand as I don't know which grid I'm in inside this event. (If someone has a better way ?).
Anyway, regarding the checklist filter, when I check a checkbox and click on "Apply", a postback is done and the Grid_ItemCommand event is raised. However it looks like the "filter value" is empty.
private void Grid_ItemCommand(object sender, GridCommandEventArgs e){ if(e.CommandName == RadGrid.FilterCommandName) { GridFilteringItem filter = (GridFilteringItem) e.Item; string value = ((filter[currentCol].Controls[0]) as TextBox).Text; Pair command = (Pair) e.CommandArgument; /* IF CLASSIC FUNCTIONNALITY IS USED * command.First = "Contains" * command.Second = myColumnName * value = theFilterStringIInputed */ /* IF CHECKLIST FUNCTIONNALITY IS USED * command.First = "5" * command.Second = myColumnName * value = Empty */ }}
Does someone know how to get the values of the selected checkbox ?
Or what did I do wrong here ?
Thank you.
Regards,
Guilhem

Hi
AppointmentInserting function, i am showing one menu and it is working correct but if the click out side Insert it should hide the menu can you please help how i can achieve this.
Panic - tree has lost its integrity at tc4
á‚£.á‚ႣႠႷ.ႨႷ(á‚ႣႨႳ )at tc4á‚£.á‚ႨႰႼ.ႥႳ(Stream , String , Stream , á‚ႨႣႠ)
at tc4á‚£.á‚ႨႰႼ.á‚¥á‚(Stream , Stream , á‚ႨႣႠ)
at tc4á‚£.á‚ႣႨႥ.ႰႨ(Stream , String , á‚ႨႣႠ, Boolean )
at tc4
Ⴃ.ႤႰႨ.ႰႠ(Stream , String , Boolean )
Hi Telerik Team,
I have encountered a problem while using rad combobox in asp wizard where my combobox could not function, i'm using the 2016 telerik dll.
It can only function when using rendermode= native, is there any other solution beside using rendermode = native?
Before this i'm using older version of telerik dll which does not cause this problem, can you please share with us the solution regarding this?
Your response are highly appreciated.
I am new to Telerik controls. I am using the Telerik RadGrid control, using another page in a project as reference/template.
I am able to assign a data source to the radgrid, but when the page is rendered nothing else is displayed.
Here is my grid definition
<div>
<asp:HiddenField runat="server" ID="hfEventID" />
<asp:HiddenField runat="server" ID="hfCompanyID" />
<asp:HiddenField runat="server" ID="hfBoothNumber" />
<telerik:RadGrid runat="server" ID="HelpRequestsGrid" OnNeedDataSource="HelpRequestsGrid_NeedDataSource" AutoGenerateColumns="true"
AllowSorting="true" AllowPaging="true" PageSize="25" ShowHeader="true">
<ClientSettings EnablePostBackOnRowClick="false" Resizing-AllowColumnResize="true" Resizing-AllowResizeToFit="true" Resizing-ShowRowIndicatorColumn="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
<Scrolling AllowScroll="True" UseStaticHeaders="true" />
</ClientSettings>
<PagerStyle Mode="NumericPages"></PagerStyle>
<ClientSettings>
<Resizing AllowColumnResize="true" AllowResizeToFit="true" AllowRowResize="true" ResizeGridOnColumnResize="true"/>
</ClientSettings>
<MasterTableView Width="100%" ClientDataKeyNames="Id" DataKeyNames="Id" AllowMultiColumnSorting="True"
ShowHeadersWhenNoRecords="true" Name="Master" NoMasterRecordsText="No help requests found.">
<NoRecordsTemplate>
No help requests found.
</NoRecordsTemplate>
</MasterTableView>
</telerik:RadGrid>
</div>
And in my codebehind here is where I set the data source
protected void HelpRequestsGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
if (CompanyID > 0 && EventID > 0)
{
HelpRequestsGrid.DataSource = Service.GetHelpRequest(EventID, CompanyID);
}
}
When I step through the code the data source gets set but come render nothing is displayed. What am I missing?
I've got a radgrid with a column containing a checkbox. when i check the checkbox, I want to select a given item in a drop down list. below is what I've figured out thus far but can't quite figure out how to check the checkbox inside the grid.
<telerik:RadGrid ID="rgClientSites" runat="server" AutoGenerateColumns="False" AllowMultiRowEdit="true" GridLines="None" Skin="Windows7">
<MasterTableView>
<Columns>
</Columns>
</MasterTableView>
<ClientSettings>
<ClientEvents OnUserAction="onClick"/>
</ClientSettings>
</telerik:RadGrid>
function onClick(sender, eventArgs) {
var grid = $find("<%= rgClientSites.ClientID %>");
var masterTable = grid.get_masterTableView();
var gridCheckItemLCRA = masterTable.get_dataItems()[0].findElement("2"); //contains a checkbox
var dropdownlist = $find("<%= ddlD.ClientID %>");
var item = dropdownlist.findItemByValue("3");
if (gridCheckItemLCRA.checked) {
item.select();
}
else {
item.unselect();
}
}
Nothing happens when I check the checkbox - how do I attach an event to an item in a cell?
Hi,
is there a way to fire the FileUploaded server-side event after using drag and drop?
I have to save the file to a given folder and I would like to use the SaveAs.
Thaks!

Hello,
I've been using client-side binding for several radgrids on my page. I have a need to clear all of their datasources simultaneously at some points. I want to be elegant and loop through all the grids instead of explicitly clearing them line by line.
I want to do something like this:
var grid = document.getElementsByClassName('SubRadGrid');$('.SubRadGrid').each(function(){ })And not like this:
var empty = [];var grid1 = $find("<%= RadGrid1.ClientID %>").get_masterTableView();grid1 .set_dataSource(empty);grid1 .dataBind();var grid2 = $find("<%= RadGrid2.ClientID %>").get_masterTableView();grid2 .set_dataSource(empty);grid2 .dataBind();var grid3 = $find("<%= RadGrid3.ClientID %>").get_masterTableView(); grid3 .set_dataSource(empty);grid3 .dataBind();