Telerik Forums
UI for ASP.NET AJAX Forum
15 answers
1.4K+ views

I have a ASP-Button that is supposed to do two things when clicked:

1. Call onClientClick to save radgrid content (batcheditmode) clientside, because radgrid doesnt provide serverside methode :-(
2. Fire Click  (postback) to save other content

Approach 1:

        btnOk.OnClientClick="SaveChangesToGrid();";
        btnOk.Click += new EventHandler(btnOk_Click);

- Click is fired

- javascript function "SaveChangesToGrid();" is called, but the grid doesnt save.

Approach 2:
        btnOk.OnClientClick="SaveChangesToGrid();return false;";
        btnOk.Click += new EventHandler(btnOk_Click);

- Click is not !! fired
- javascript function "SaveChangesToGrid();" is called and saves then grid.

 

Using the built-in save buttun works.

Is there any possiblity to save a RadGrid AND other page-content with only clicking one button ??

 I have searched this forum for more than a day, but nothing works for me.

Thanks for any help

 

 

 




onClientItemClicked / onClientItemClicking prevents that itemClick is fired.

Doncho
Telerik team
 answered on 08 Jan 2021
1 answer
215 views

I'm working on replacing a standard asp.net menu with RadMenu. I used this to come up with something I think I can live with on the desktop and mobile:

https://docs.telerik.com/devtools/aspnet-ajax/controls/menu/how-to/auto-height-of-mobile-radmenu-items-group-popup?_ga=2.68372561.1121007008.1609881912-1221423875.1609164691

The auto height fixes the scroll bar issue, but in mobile render, the expand icon is so far over it is off the background for the pop-up. They are very light in color and once they are off the pop-up background, really hard to see.

See attached image.

If I could get this fixed, I think I could live with this setup. Thanks.

And for the record, searching the documentation for this subject doesn't turn up much.

 

 

 

Doncho
Telerik team
 answered on 08 Jan 2021
1 answer
288 views

Hi

I'm using RadScriptManager to bundle external scripts like jquery.

There are other components in my project that use assembly resources to add scripts like jQuery.Ui.

the problem is that ScriptResource.axd is added to the page before Telerik.WebResource.axd so jquery is not added and it does not work.

is there any way to change this ordering and force telerik webresource for radscriptmanager to be added first.

best regards.

 

Attila Antal
Telerik team
 answered on 08 Jan 2021
1 answer
305 views

i would like to know how do i set the NumberFormat in code behind on runtime as my control are created dynamically during Page_Init event.

 

 

Doncho
Telerik team
 answered on 08 Jan 2021
2 answers
376 views

Hi,

     

Peter Milchev
Telerik team
 answered on 06 Jan 2021
7 answers
446 views
I am getting this error every time I go to create a new solution from the Telerik asp.net AJAX web app template.  My preexisting solutions will also no longer function.  It seems they can't find most of the telerik assemblies.  I first tried to repair the installation; I then tried uninstalling and re installing the telerik asp.net AJAX package.  I'm getting the same error as before.

Any help would be greatly appreciated.



Error occurred while running wizard.

System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Telerik.Windows.Themes.Modern.2012.2.0903.1135, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey)
   at MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String& partName, Boolean& isContentFile)
   at MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri)
   at System.IO.Packaging.Package.GetPartHelper(Uri partUri)
   at System.IO.Packaging.Package.GetPart(Uri partUri)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c__DisplayClass0.<Create_BamlProperty_ResourceDictionary_Source>b__453(Object target, Object value)
   at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Telerik.VSX.Shell.Xaml.CommonXaml.InitializeComponent()
   at Telerik.VSX.Shell.VSWindow..ctor()
   at Telerik.VSX.WizardEngine.UI.WizardForm..ctor()
   at Telerik.VSX.WizardEngine.UI.WizardForm.Create(String title, String titleIcon, String backgroundImage)
   at Telerik.Web.UI.VSX.ProjectConfigurators.ProjectConfigurationTypeSelector.CreateWizardForm(String title, String titleIcon, String backgroundImage)
   at Telerik.Web.UI.VSX.ProjectConfigurators.ProjectConfigurationTypeSelector.NewProject(ProjectKind projectKind)
   at Telerik.Web.UI.VSX.ProjectConfigurators.NewProjectConfigurator.GetProjectConfigurator()
   at Telerik.VSX.ProjectConfiguration.DiscontinuousProjectConfiguration.TryCollectData()
   at Telerik.VSX.VSPackage.TemplateWizardBase.PrepareWizard(Object automationObject, Dictionary`2 replacementsDictionary)
   at Telerik.VSX.VSPackage.TemplateWizardBase.RunStarted(Object automationObject, Dictionary`2 replacementsDictionary, WizardRunKind runKind, Object[] customParams)
   at Telerik.VSX.VSPackage.TemplateEntryPointWizardBase.RunStarted(Object automationObject, Dictionary`2 replacementsDictionary, WizardRunKind runKind, Object[] customParams)
   at Telerik.VSX.VSPackage.WizardBase.<>c__DisplayClass5.<Microsoft.VisualStudio.TemplateWizard.IWizard.RunStarted>b__4()
   at Telerik.VSX.VSPackage.WizardBase.CatchExceptionAndSendReport(Action action)
Vesko
Telerik team
 answered on 06 Jan 2021
13 answers
1.4K+ views

Hi,

How we can hide the version of Telerik currently installed from the HTML source?
We don't want to show this information at client side to prevent the hackers can use vunerabilities known in the version we used/installed in our applications.

If we check the HTML source, we see the following:
- <!-- 2018.2.710.45 -->
- Telerik.Web.UI%2c+Version%3d2018.2.710.45 in Telerik.Web.UI.WebResource.axd

Rumen
Telerik team
 answered on 06 Jan 2021
7 answers
626 views
Hello!

Is there possibility to expand RecurrenceRule in C# instead of using SQL UDF (provided here: http://www.telerik.com/community/forums/aspnet-ajax/scheduler/sql-reporting-display-all-recurring-appointments.aspx)?

For example I have List of type Appointment and I want to expand Recurrences in elements which have RecurrencyRule != null so the result will be List of upcoming events ordered by Start attribute.

Is this possible?

Thanks in advance

EDIT:

I've opened ExpandRecurrence_UDF zip file from post about SQL UDF and I've found function which returns occurences for RecurrenceRule string but when I try to parse my RecurrenceRules which are being parsed by SQL UDF function I can't get this make to work under C#.

Function:

        public static IEnumerable ExpandRecurrence(string recurrenceRule, DateTime rangeStart, DateTime rangeEnd) 
        { 
            List<OccurrenceInfo> occurrences = new List<OccurrenceInfo>(); 
            RecurrenceRule rrule; 
            if (RecurrenceRule.TryParse(recurrenceRule, out rrule)) 
            { 
                rrule.SetEffectiveRange(rangeStart, rangeEnd); 
                foreach (DateTime occStart in rrule.Occurrences) 
                { 
                    OccurrenceInfo info = new OccurrenceInfo(occStart, occStart.Add(rrule.Range.EventDuration)); 
                    occurrences.Add(info); 
                } 
            } 
 
            return occurrences; 
        } 

Occurences class:

public class OccurrenceInfo 
    private DateTime start; 
    private DateTime end; 
 
    public OccurrenceInfo(DateTime start, DateTime end) 
    { 
        this.start = start; 
        this.end = end; 
    } 
 
    public DateTime Start 
    { 
        get { return start; } 
        set { start = value; } 
    } 
 
    public DateTime End 
    { 
        get { return end; } 
        set { end = value; } 
    } 

Sample RecurrenceRule string which I'm tryign to parse:

RecurrenceRule.TryParse("DTSTART:2008422T000000Z\nDTEND:2008423T000000Z\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTHDAY=22;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYMONTH=04\n"out rrule) 

I've tryed to use Replace function to convert \n to Environment.NewLine but it was returning false too.

EDIT2: I've found bug in my RecurrencyRule string. Month in DTSTART and DTEND was in X format (for months 1-9) instead of XX

Marin Bratanov
Telerik team
 answered on 05 Jan 2021
1 answer
256 views

After installing Visual Studio 2019 and Reporting Services, then installing UI ASP.NET 2020_3_1021, visual studio crashes with a "Not Responding" when opening any reporting solution/project. Is there a conflict with versions?

Thank you,

Jim

Nikolay Mishev
Telerik team
 answered on 05 Jan 2021
3 answers
419 views

Hi,

We have a solution that users can use either with a Windows solution or with a Web browser.

With your great support, we were able to add PushButtonField to a PDF file with Windows Forms solution.

Is this possible also with Ajax version? To get a mouse location, zoom and information if document is rotated. I'm really bad with Javascript.

Thanks in advance for your great support!

Br. Mikko

 

Doncho
Telerik team
 answered on 05 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?