Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
302 views

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);
            }
        }


Mark
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 Feb 2023
15 answers
952 views
hi ,
  I am using rad controld for asp.net ajax and use radgrid for self reference heirarchy. All working nice.
But now i want to hide the built in collapse / expand button when not have child view in the row. How can i achive this?
Eldhose
Top achievements
Rank 1
Iron
 updated answer on 20 Feb 2023
0 answers
140 views

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.

Chuck
Top achievements
Rank 1
 asked on 18 Feb 2023
0 answers
92 views

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

Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
 asked on 17 Feb 2023
0 answers
89 views
Is there any way with AsyncUpload to allow uploading of files with no extension?
Rana Asim
Top achievements
Rank 1
 asked on 17 Feb 2023
1 answer
119 views

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.

 

Attila Antal
Telerik team
 answered on 17 Feb 2023
5 answers
695 views
Hi,

I have 2 RadDatePickers.

and 1 button.



I want to know how to get number of day between selected date 1 and selected date 2 when I click the button.
jack
Top achievements
Rank 1
Iron
 updated answer on 16 Feb 2023
1 answer
207 views

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>
And it worked. So, my question is, is this bug known? How can I solve this if I want to use RadAjaxManager?
Attila Antal
Telerik team
 updated answer on 16 Feb 2023
0 answers
130 views
I am using telerik version 2014.3.1024.45 with Asp.Net Webforms

I have 'EnableDragAndDropBetweenNodes' property to true in my telerik control. In the run time I am also adding parent node. When I drag an item and hover on other item, I see dotted line (below or above the item) which indicates the position of insertion. When I drag an item and hover on parent node, I can also see dotted lines. 

My need is that, when I drag on parent node, I do not want that dotted line (only for parent node). How can I achieve it ? Setting 'EnableDragAndDropBetweenNodes' to false or true statically in control will apply for all the items (Subitems and Parent Node). I tried setting EnableDragAndDropBetweenNodes dynamically on MouseOver event, but it still shows me the dotted line on parent node.
G
Top achievements
Rank 1
 asked on 15 Feb 2023
2 answers
143 views

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

Ludovic
Top achievements
Rank 1
Iron
 answered on 10 Feb 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?