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

Hi

When using a combobox that has a client item template ("#= Nme ## if(!Ena){# <span class=""disabled""> (disabled)</span> #}#") I find that when checkboxes are enabled the checkbox appears on the line above the template text.  I have tried using the nowrap method along with white-space and word-break styles with no luck.

The online demos shows each modes independantly but not having seen them together I don't know if this is my code or a fundamental issue with the control.  Any ideas for a fix?

Regards

Jon

Dimitar
Telerik team
 answered on 09 Aug 2016
2 answers
220 views

When re-creating a dynamic wizard in user control The active step is not reset to 0 with:

rw.WizardSteps.Clear()

How can I achieve a reset of the active step?

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 09 Aug 2016
3 answers
472 views

Hi,

 

I have a radgrid with scrolling enabled and static headers. Everything works perfect. However, the issue im faced with is when I click edit, I need to scroll down to get to the edit portion and after saving or cancelling, the scroll position is saved on the LAST scroll position, which means that the scroll position will now be way lower than it was when I clicked edit. I hope this makes sense.

 

All I want to do, is save the scroll position when I clicked edit, so that once updated or cancelled, that it will go back to that scroll position. 

 

Please could you help ?

 

Thank you

Eyup
Telerik team
 answered on 09 Aug 2016
1 answer
145 views

Still in beginner phase of radscheduler use/knowledge

local testing opens the radscheduler as expected, but as I try the export to pdf  , using

  protected void RadButton1_Click(object sender, EventArgs e)
   {
            
            RadScheduler1.ExportToPdf();
   }

get this error on localhost

Server Error in '/' Application.

The remote certificate is invalid according to the validation procedure.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace: 

[AuthenticationException: The remote certificate is invalid according to the validation procedure.] System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +2247769 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +77 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +191 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +77 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +191 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) +77 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +191 System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +206 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +148 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +350 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +23 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +82 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +1132 System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +61 System.Net.ConnectStream.WriteHeaders(Boolean async) +475 [WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.] System.Net.HttpWebRequest.GetResponse() +1740 Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheet(String url) +115 Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheetFor(String controlName, Type controlType, Page page, String pathFormatString, String defaultPathFormatString) +342 Telerik.Web.UI.Scheduler.SchedulerExporter.GetStyleSheets(Page page) +91 Telerik.Web.UI.Scheduler.SchedulerExporter.RenderControl(Page page) +492 Telerik.Web.UI.Scheduler.SchedulerExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +76 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +263 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +131 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +263 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80 Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +1029 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +263 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8921

 

code behind 

 

using Scheduler.Examples.BindToList;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using Telerik.Web.UI.Scheduler;

 
public partial class AMGR_RadSchedulerTest : System.Web.UI.Page
    {
        private const string AppointmentsKey = "Telerik.Web.Examples.Scheduler.BindToList.CS.Apts";
       
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

        

           // RadScheduler1.ExportSettings.Pdf.PaperOrientation = (SchedulerPaperOrientation)Enum.Parse(typeof(SchedulerPaperOrientation), PaperOrientation.SelectedValue);
          

            RadScheduler1.ExportSettings.FileName = "Talisman";
            RadScheduler1.ExportSettings.Pdf.PageTitle = "hello";
            RadScheduler1.ExportSettings.Pdf.Author = "Mandar";
            RadScheduler1.ExportSettings.Pdf.Creator = "Mandar";
            RadScheduler1.ExportSettings.Pdf.Title = "test pdf";
            RadScheduler1.ExportSettings.OpenInNewWindow = true;

            RadScheduler1.ExportSettings.Pdf.AllowPaging = true;

           
            RadScheduler1.RowHeight = Unit.Pixel(60);
        }
         
         
        private List<AppointmentInfo> Appointments
        {
            get
            {
                List<AppointmentInfo> sessApts = Session[AppointmentsKey] as List<AppointmentInfo>;
                if (sessApts == null)
                {
                    sessApts = new List<AppointmentInfo>();
                    Session[AppointmentsKey] = sessApts;
                }
 
                return sessApts;
            }
        }
 
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
 
            if (!IsPostBack)
            {
                Session.Remove(AppointmentsKey);
 
                InitializeResources();
                InitializeAppointments();
            }
 
            this.RadScheduler1.DataSource = Appointments;
        }
 
        protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
        {
            Appointments.Add(new AppointmentInfo(e.Appointment));
        }
 
        protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
        {
            AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);
 
 
            RecurrenceRule rrule;
 
            if (RecurrenceRule.TryParse(e.ModifiedAppointment.RecurrenceRule, out rrule))
            {
                rrule.Range.Start = e.ModifiedAppointment.Start;
                rrule.Range.EventDuration = e.ModifiedAppointment.End - e.ModifiedAppointment.Start;
                TimeSpan startTimeChange = e.ModifiedAppointment.Start - e.Appointment.Start;
                for (int i = 0; i < rrule.Exceptions.Count; i++)
                {
                    rrule.Exceptions[i] = rrule.Exceptions[i].Add(startTimeChange);
                }
                e.ModifiedAppointment.RecurrenceRule = rrule.ToString();
            }
 
            ai.CopyInfo(e.ModifiedAppointment);
        }
 
        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
        {
            Appointments.Remove(FindById(e.Appointment.ID));
        }
 
        private void InitializeResources()
        {
            ResourceType resType = new ResourceType("User");
            resType.ForeignKeyField = "UserID";
 
            RadScheduler1.ResourceTypes.Add(resType);
            RadScheduler1.Resources.Add(new Resource("User", 1, "Alex"));
            RadScheduler1.Resources.Add(new Resource("User", 2, "Bob"));
            RadScheduler1.Resources.Add(new Resource("User", 3, "Charlie"));
        }
 
        private void InitializeAppointments()
        {
            DateTime start = DateTime.UtcNow.Date;
            start = start.AddHours(6);
       //     Appointments.Add(new AppointmentInfo("Take the car to the service", start, start.AddHours(1), string.Empty, null, new Reminder(30).ToString(), 1));
            Appointments.Add(new AppointmentInfo("Meeting with Alexa", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 1));
           
            Appointments.Add(new AppointmentInfo("Meeting with Sam", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 1));
            Appointments.Add(new AppointmentInfo("Meeting with Gopal", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            Appointments.Add(new AppointmentInfo("Meeting with Ram", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 3));
            Appointments.Add(new AppointmentInfo("Meeting with Mohammad", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 3));
            Appointments.Add(new AppointmentInfo("Meeting with David", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 3));
            //Appointments.Add(new AppointmentInfo("Meeting with Ashley", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Teresa", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Meg", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Kravitz", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Leonard", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Sam", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Gopal", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Ram", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Mohammad", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with David", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Ashley", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Teresa", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Meg", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Kravitz", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Leonard", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
            //Appointments.Add(new AppointmentInfo("Meeting with Sam", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
      
      
       
 
            start = start.AddDays(-1);
            DateTime dayStart = RadScheduler1.UtcDayStart(start);
            Appointments.Add(new AppointmentInfo("Bob's Birthday", dayStart, dayStart.AddDays(1), string.Empty, null, string.Empty, 1));
            Appointments.Add(new AppointmentInfo("Call Charlie about the Project", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));
 
            start = start.AddDays(2);
            Appointments.Add(new AppointmentInfo("Get the car from the service", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 1));
        }
 
        private AppointmentInfo FindById(object ID)
        {
            foreach (AppointmentInfo ai in Appointments)
            {
                if (ai.ID.Equals(ID))
                {
                    return ai;
                }
            }
 
            return null;
        }

        private Hashtable processedDateWraps = new Hashtable(); 
        protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
        {
            //if (RadScheduler1.SelectedView == SchedulerViewType.MonthView)
            //{
            //    Control dayWrap = GetDateWrap(e.Container);

            //    if (!processedDateWraps.ContainsKey(dayWrap))
            //    {
            //        // Only do the count once per day cell. 
            //        processedDateWraps.Add(dayWrap, null);

            //        // We will use the appointment start time to determine the date for the current cell. 
            //        // Appointments that span multiple days are a special case. 
            //        // They are rendered in parts and by using the part index, we can still calculate the correct day. 
            //        // For example part 1 will rendered on the start date, part 2 on the start date + 1 day and so on. 
            //        Control aptControl = GetAppointmentControl(e.Container);
            //        int partIndex = Convert.ToInt32(aptControl.ID.Split('_')[1]);
            //        DateTime aptStart = e.Appointment.Start.AddDays(partIndex);

            //        // Calculate the day start and end time and count the appointments in it. 
            //        DateTime dayStart = RadScheduler1.UtcDayStart(aptStart);
            //        DateTime dayEnd = dayStart.AddDays(1);
            //        int appointmentsCount = RadScheduler1.Appointments.GetAppointmentsInRange(dayStart, dayEnd).Count;

            //        // Add a literal control with the count. 
            //        string label = string.Format(" ({0} total)", appointmentsCount);
            //        dayWrap.Controls.Add(new LiteralControl(label));
            //    }
            //} 
        }


        private Control GetDateWrap(Control aptContainer)
        {
            Control cell = GetParentByCssClass(aptContainer, "rsCell");
            return cell.Controls[0]; // rsDateWrap 
        }

        private Control GetAppointmentControl(Control aptContainer)
        {
            Control aptWrap = GetParentByCssClass(aptContainer, "rsAptWrap");
            return aptWrap.Parent;
        }


        protected void RadButton1_Click(object sender, EventArgs e)
        {
            
            RadScheduler1.ExportToPdf();
        }


        private Control GetParentByCssClass(Control container, string cssClass)
        {
            Control parent = container;
            while (parent != Page)
            {
                WebControl candidate = parent as WebControl;

                if (candidate != null)
                {
                    string[] allClassses = candidate.CssClass.Split(' ');
                    if (Array.IndexOf(allClassses, cssClass) != -1)
                    {
                        return candidate;
                    }
                }

                parent = parent.Parent;
            }

            return null;
        }


        protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
        {
            if (e.CommandName == "Export")
            {
                WriteCalendar(RadScheduler.ExportToICalendar(e.Container.Appointment));
            }
        }

        private void WriteCalendar(string data)
        {
            HttpResponse response = Page.Response;

            response.Clear();
            response.Buffer = true;

            response.ContentType = "text/calendar";
            response.ContentEncoding = Encoding.UTF8;
            response.Charset = "utf-8";

            response.AddHeader("Content-Disposition", "attachment;filename=\"RadSchedulerExport.ics\"");

            response.Write(data);
            response.End();
        }

        protected void ImgBtn1_Click(object sender, EventArgs e)
        {
            WriteCalendar(RadScheduler.ExportToICalendar(RadScheduler1.Appointments));
        }

        protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
        {
            //if (e.Command == SchedulerNavigationCommand.SwitchToSelectedDay && RadScheduler1.SelectedView == SchedulerViewType.DayView)
            //    e.Cancel = true;

            Response.Redirect("RadGridCalList.aspx");
        }


        protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            e.Appointment.Visible = false;
            FilterAppointment(e.Appointment, AlexCheckBox, 1);
            FilterAppointment(e.Appointment, BobCheckBox, 2);
            FilterAppointment(e.Appointment, CharlieCheckBox, 3);
        }

        private static void FilterAppointment(Appointment appointment, ICheckBoxControl checkBox, int resourceId)
        {
            if (appointment.Resources.GetResource("User", resourceId) != null && checkBox.Checked)
            {
                appointment.Visible = true;
            }
        }

        protected void btnToggle_Click(object sender, EventArgs e)
        {
            RadScheduler1.Rebind();
        }
       
}

 
namespace Scheduler.Examples.BindToList
{
    public class AppointmentInfo
    {
        private readonly string _id;
        private string _subject;
        private DateTime _start;
        private DateTime _end;
        private string _recurrenceRule;
        private string _recurrenceParentId;
        private string _reminder;
        private int? _userID;
 
        public string ID
        {
            get
            {
                return _id;
            }
        }
 
        public string Subject
        {
            get
            {
                return _subject;
            }
            set
            {
                _subject = value;
            }
        }
 
        public DateTime Start
        {
            get
            {
                return _start;
            }
            set
            {
                _start = value;
            }
        }
 
        public DateTime End
        {
            get
            {
                return _end;
            }
            set
            {
                _end = value;
            }
        }
 
        public string RecurrenceRule
        {
            get
            {
                return _recurrenceRule;
            }
            set
            {
                _recurrenceRule = value;
            }
        }
 
        public string RecurrenceParentID
        {
            get
            {
                return _recurrenceParentId;
            }
            set
            {
                _recurrenceParentId = value;
            }
        }
 
        public int? UserID
        {
            get
            {
                return _userID;
            }
            set
            {
                _userID = value;
            }
        }
 
        public string Reminder
        {
            get
            {
                return _reminder;
            }
            set
            {
                _reminder = value;
            }
        }
 
        private AppointmentInfo()
        {
            _id = Guid.NewGuid().ToString();
        }
 
        public AppointmentInfo(string subject, DateTime start, DateTime end,
            string recurrenceRule, string recurrenceParentID, string reminder, int? userID) : this()
        {
            _subject = subject;
            _start = start;
            _end = end;
            _recurrenceRule = recurrenceRule;
            _recurrenceParentId = recurrenceParentID;
            _reminder = reminder;
            _userID = userID;
        }
 
        public AppointmentInfo(Appointment source) : this()
        {
            CopyInfo(source);
        }
 
        public void CopyInfo(Appointment source)
        {
            Subject = source.Subject;
            Start = source.Start;
            End = source.End;
            RecurrenceRule = source.RecurrenceRule;
            if (source.RecurrenceParentID != null)
            {
                RecurrenceParentID = source.RecurrenceParentID.ToString();
            }
 
            if (!String.IsNullOrEmpty(Reminder))
            {
                Reminder = source.Reminders[0].ToString();
            }
 
            Resource user = source.Resources.GetResourceByType("User");
            if (user != null)
            {
                UserID = (int?)user.Key;
            }
            else
            {
                UserID = null;
            }
        }
    }
}

Dimitar
Telerik team
 answered on 09 Aug 2016
1 answer
125 views

I am working on an web page that uses the RadTabStrip, RadTab,RadMultiPage, and RadPageView objects.

There are four tabs. The first three tabs contain various RadText, RadDropDownList, and RadListBox objects for the user to enter information. On the first page, when the user enters an ID number, a server call populates information currently on file for that number. That works without any issues. 

My problem is when the third tab is selected, I need to call a server routine that will use information entered from the first two tabs to populate the RadDropDownList and RadListBox objects on that page. The code I have written is being executed, but when it returns, the third tab is not selected and the page view of that tab is not displayed. Instead you still see the last tab that was active. In addition if the last tab was tab one, then clicking on tab two results in tab two being displayed and the contents of tab one being displayed under it.

I am calling my routine from the OnTabClick event of the RadTabStrip:

       

<telerik:RadTabStrip RenderMode="Lightweight" runat="server" ID="RadTabStrip1"  MultiPageID="RadMultiPage1" SelectedIndex="0" Skin="Silk" AutoPostBack="true"  OnTabClick="tabViewChanged"  >

Is there something I need to do at the end of my code to have the page view display? I tried this:

RadTab tab1 = RadTabStrip1.Tabs.FindTabByText("Benefits");
tab1.Selected = true;
tab1.PageView.Selected = true;

but it did not appear to have any effect.

I am hoping there is just some type of render call that I am missing.

Veselin Tsvetanov
Telerik team
 answered on 09 Aug 2016
15 answers
890 views
When I try to bind a TimeSpan column to an MVC extension Grid I am getting a weird [object Object] displayed.
My binding code is like:

.Columns(columns =>
                {
                    columns.Bound(p => p.Runner);
                    columns.Bound(p => p.RaceDate).Format("{0:dd/MM/yyyy}").Width(50);
                    columns.Bound(p => p.Race);
                    columns.Bound(p => p.Finish).Format("{0:hh\\:mm\\:ss}").Width(40);
                    columns.Bound(p => p.Pace).Format("{0:hh\\:mm\\:ss}").Width(40);
})

The DateTime column is fine it is just the TimeSpan columns giving the problem.
Any ideas on how to overcome?
Is it a display format issue?
jeff
Top achievements
Rank 1
 answered on 08 Aug 2016
6 answers
350 views
Hello,
I am very new to Telerik controls and working on proof of concept with the controls and have a question.

I have created a simple radmenu example which is in a RadPageLayout with GridType="Fluid".
If I take the web browser and manually decrease the width of the browser my assumption was it would automatically change the radmenu into a mobile "menu".
For example:  if i go to the Bootstrap page http://getbootstrap.com/examples/navbar/ and decrease the width the navigation bar would turn mobile friendly.
I have upload a (choppy) video of it here for viewing: http://tinypic.com/r/1znoi8o/8

Doing a bit more reading i found there is a property on the radmenu control called "RenderMode".
If I set it to "Mobile" i will see the mobile dropdown (although the child menu doesn't show up) but this isn't what i'd want because that would mean i would need to create multiple pages based on device detection.  I tried RenderMode=Auto but that didn't work either.

I hope my question makes sense.
Perhaps I am missing setting a property?
thanks.
Keith
Top achievements
Rank 1
 answered on 08 Aug 2016
5 answers
611 views
I have a combobox created server side as so:

myComboBox = new RadComboBox
{
    ID = "myComboBoxID",
    EnableLoadOnDemand = true,
    EnableItemCaching = false,
    ShowMoreResultsBox = false,
    EnableVirtualScrolling = true,
    ItemsPerRequest = -1
};
 
myComboBox.WebServiceSettings.Path = myWebServicePath;
myComboBox.WebServiceSettings.Method = myWebServiceMethod;
myComboBox.OnClientItemsRequesting = myClientItemsRequestingEvent;

with the clientside event defined as:

myClientItemsRequestingEvent = function (sender, eventArgs) {
    var context = eventArgs.get_context();
    context.refID = this.get_myRefID;
};

The webservice call populates the combobox depending on the value of refID. My problem is that this value is dynamic. It changes depending on other elements on the page, and the combobox should be populated appropriately. The problem is, the combobox only seems to call the itemRequestEvent once, when it is opened the first time after page load.

Ideally I would like this event to fire every single time the dropdown is opened, with the combobox being repopulated each time. Is this possible?
Peter Milchev
Telerik team
 answered on 08 Aug 2016
11 answers
132 views

I've got a customer who is reporting that occasionally when exporting from the grid (and then opening the file directly rather than saving it), they receive an error message box from Excel, "Unable to read file."

I have been unable to reproduce the issue, and it doesn't happen every time for them either. Any thoughts on what could be causing this?

Ryan
Top achievements
Rank 1
 answered on 08 Aug 2016
1 answer
190 views

I have a radbutton on my form that is disabled.

I have about 10 RadComboboxes on the same form.

I'm trying to enable the Radbutton once a Value is selected from the any of the comboboxes.

Can't seem to get this working.

Any help would be appreciated.

 

<telerik:RadComboBox ID="ddl1" runat="server" Width="90px" Skin="Vista" Font-Names="Verdana" Font-Size="Small" ZIndex="8900" OnClientDropDownOpening="Enable_Save">
                        </telerik:RadComboBox>

 

<script type='text/javascript'>
function Enable_Save()
{
    if(document.getElementById("ddl1").value!="")
        document.getElementById("b1").disabled=false;
    else
    document.getElementById("b1").disabled=true;

}

</script>

 

 

Ivan Danchev
Telerik team
 answered on 08 Aug 2016
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?