This is exactly what I need. But then I tried it. Now my radgrid does not filter at all. It is something in the prerender.. if I remove this.
Then filtering works again. Is there something that I am missing? It is like the preRender is canceling out my filter. I am using a needdatasource
https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/grid-save-and-restore-the-filters-automatically
protected void grdProducts_PreRender(object sender, EventArgs e)
{
var grid = (RadGrid)sender;
// If the flag is True
if (IsFiltering)
{
// Save the Filters
SaveFilters(grid);
// Clear the Flag by setting its value to False
IsFiltering = false;
}
// At initial Load (when not is a PostBack)
if (!IsPostBack)
{
// Restore the Filters
RestoreFilters(grid);
}
}
Is there any way to restrict the user from entering custom text into a databound multicolmncombobox. Forcing them to select an existing item. A dropdown list is not usable as it is bound to a table which has 5000 records. Some filtering based on a couple of fields is required.
Trying to use Lightweight mode but in current browsers it's now working properly and it's even unusable with RadTreeview. I even tried to use your ThemeBuilder but the online sample gives bad results also. Check the image from ThemeBuilder.
I'm using Windows 11, latest version of Edge.
Thank you
Is it possible to subclass the RadTreeNode and get it back on a node click. In the image attached I've made a class inheriting from RadTreeNode named FileTreeNode. It kinda works except my custom properties appear but do not have any data. FIleName is null.
Hello,
I have a usercontrol that provides an Event:
public event EventHandler<FilePickerSelectionEventArgs> FileSelectionChanged;
This event is raised by the control using:
protected void RaiseFilePickerSelectionChangedEvent(ArrayList selectedFiles)
{
// Copy handler to temp var to make operation thread safe:
EventHandler<FilePickerSelectionEventArgs> handler = FileSelectionChanged;
if (FileSelectionChanged!=null)
{
FilePickerSelectionEventArgs args = new FilePickerSelectionEventArgs();
args.SelectedFiles = selectedFiles;
handler(this, args);
}
}
This usercontrol is placed inside an aspx page without masterpage. I need to update other controls that exist on the page when the UC event is raised. So, in the page I placed the code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="filePicker" EventName="FileSelectionChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="labelStatus" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<UC:FilePicker id="filePicker" runat="server" AllowedFileExtensions="jpg,jpeg,png" OnFileSelectionChanged="filePicker_FileSelectionChanged"></UC:FilePicker>
The problem is that RadAjaxManager is not working with this event. I'm sure it's correct because if I change it to something that does not exist, an error is returned saying that no event with that name is found.
Tried doing AjaxSettings in my page code behind but that did not work as well.
Tried to use a simple UpdatePanel:
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="labelStatus" runat="server"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="filePicker" EventName="FileSelectionChanged" />
</Triggers>
</asp:UpdatePanel>
I have a RadGrid with a GridDateTimeColumn.
This GridDateTimeColumn has EnableRangeFiltering="true" to display the filter :
<telerik:GridDateTimeColumn DataField="xxx" HeaderText="xxx" AutoPostBackOnFilter="true"
SortExpression="xxx" UniqueName="xxx" PickerType="DatePicker"
DataFormatString="{0:D}" EnableRangeFiltering="true" ShowFilterIcon="false">
</telerik:GridDateTimeColumn>
I have changed the currentCulture of the thread to display calendar in French.
But, if I click on the selected month, I have another popup to choose month and years :
I would like to change the label of the three button "Today", "Ok" and "Cancel".
I have access to the RadDatePicker with the RadGrid OnItemDataBound function, but the following code doesn't work :
protected void RadGrid_OnItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
...
} else if (e.Item is GridFilteringItem)
{
GridFilteringItem filterItem = e.Item as GridFilteringItem;
var columns = filterItem.OwnerTableView.RenderColumns
.OfType<GridDateTimeColumn>()
.Where(x => x.AllowFiltering && x.EnableRangeFiltering);
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
foreach (GridColumn col in columns)
{
...
RadDatePicker picker = filterItem[col.UniqueName].Controls[1] as RadDatePicker;
picker.Calendar.FastNavigationSettings.CancelButtonCaption = "Annuler";
...
}
}
}
Someone knows how I can access on this three button in my c# code to change this property ?
Thanks