Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
118 views
hi,

Anyone know how to prevent automatic date recognition in datepicker even if i typed a wrong date.

thanks.
Benjamin
Top achievements
Rank 1
 answered on 05 Oct 2009
1 answer
249 views
Hi,

First let me say that I've seen this post at the following URL, and it won't do everything I need to do.

http://www.telerik.com/community/forums/aspnet-ajax/calendar/how-to-prevent-client-dateselected-from-being-fired.aspx

I have a RadDatePicker with a Calendar, and want to do the following:
 - Allow the user to change a date by editing the textbox of the RadDatePicker (and also via the calendar popup).
 - When they do change the date by editing the textbox of the RadDatePicker, I want to have a javascript function confirm that they really want to do this.
 - If they choose to Cancel, I want to reset the date in the RadDatePicker textbox back to its original value.

I can do all of that via a javascript function assigned to the OnDateSelected client side event.  But when I reset the date back to the original date using set_selectedDate, that of course causes the OnDateSelected event to fire again.  So in my case, I get another prompt asking them to confirm their actions.

Question:  How can I cancel the event before calling set_selectedDate, so the event doesn't fire again?
The workaround shown in the link above, does something in the popup opening event.  But that doesn't handle the case I'm talking about, where the user physically changes the date by typing in the textbox.

Thanks,
Brent
Dimo
Telerik team
 answered on 05 Oct 2009
2 answers
116 views
I am trying to create a SQL Server like interface where a row is always available for adding new entries to a table.  As you enter data for one of the columns it automatically adds a new blank row.  This is done to allow multiple rows to be added without having to hit the "add" button.  How do I accomplish this?

Thanks

DH
Danton Harrylal
Top achievements
Rank 1
 answered on 05 Oct 2009
7 answers
109 views
on your online sample, there is a bug

http://demos.telerik.com/aspnet-ajax/scheduler/examples/outlook2007/defaultcs.aspx

if you go to February 9, 2009 in the calendar and mouse over the day showing an appointment the appoinement dissapears on the calendar on  mouse over. I am experiencing the same thing on code based off of this sample. please help because this makes the feature kinda useless
Mira
Telerik team
 answered on 05 Oct 2009
3 answers
116 views
Can somebody please help with this as it's doing my head in! When I am editing an appointment in advanced edit mode, everything updates fine apart from the start date and time, for some reason this does not want to update, If I drag and drop the same appointment the start time updates no problem - any idea why this might be? I'm binding in the advanced edit template as follows;

<

 

telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server" SelectedDate='<%# Bind("Start") %>' TimeView-EndTime="18:59:59" TimeView-StartTime="08:00:00" TimeView-Interval="00:30:00"  />

 

 

</telerik:RadDateTimePicker>

 

Peter
Telerik team
 answered on 05 Oct 2009
2 answers
63 views
I'm working on upgrading versions to RadControls for ASPNET AJAX Q1 2009 from an unknown version which is probably a couple of years old... on a RadAjax.Net2 Assembly, its version is 1.7.2.0.

What is the equivalent of the AjaxLoadingPanel in the new version?

Also, what is the equivalent of Telerik.WebControls.Tab and Telerik.WebControls.PageView?

Thanks,
Dave
Iana Tsolova
Telerik team
 answered on 05 Oct 2009
2 answers
114 views
Hi There

Is there a way to colour the background e.g. white text on red background, of the filter box (on the grid header) when it has a value in it, non-completed filter boxes to remain white.

Regards

Steve
Steve Todd
Top achievements
Rank 1
 answered on 05 Oct 2009
1 answer
116 views
Hi,
     I'm using a radscheduler which is same as the following demo
http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaproviderthatsupportsmultivaluedresources.html

instead of using teacher and student , i'm using room and users

users are listed in checkbox which is populated from the usercontrol  MultipleValuesResourceControl.ascx

in this MultipleValuesResourceControl.ascx  i'm checking the resouceavailability  which is in this demo with slide modification

http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx

here is the code

private IEnumerable<Resource> GetResources(string resType)
        {
            List<Resource> availableUsers = new List<Resource>(Owner.Resources.GetResourcesByType("User"));
            List<Resource> availableResources = new List<Resource>();
            IEnumerable<Resource> resources = Owner.Resources.GetResourcesByType(resType);
            
                foreach (Appointment appointmentInRange in Owner.Appointments.GetAppointmentsInRange(Appointment.Start, Appointment.End))
                {
                    if (appointmentInRange == Appointment)
                        continue;

                    foreach (Resource occupiedUser in appointmentInRange.Resources.GetResourcesByType("User"))
                    {
                        availableUsers.Remove(occupiedUser);
                    }
                    if (availableUsers.Count == 0)
                    {
                        found = true;
                    }
                }         
           
                //foreach (Resource res in resources)
                //{
                //    if (IncludeResource(res))
                //    {
                //        availableResources.Add(res);
                //    }
                //}

                //return availableResources;
           
            return availableUsers;
        }

the commented code was the original one, but i did mofication to check the available resources

while editing an appointment which is reoccuring i'm having some pblm, otherwise its working good

while editing the reoccuring appointment  ie "EDIT ONLY THIS OCCURENCE"  it shows error "Object reference cannot set to an instance".

if anyone has any idea plz help



Peter
Telerik team
 answered on 05 Oct 2009
2 answers
641 views
Hola.

Tengo un problema a la hora de cambiar las propiedades de un RadComboBox a la hora de querer insertar o actualizar un dato en el Grid cuando me abre el formulario. Inicialmente defino la columna de tipo GridDropDownColumn como se ve a continuación:

GridDropDownColumn Col_NameSyst = new GridDropDownColumn(); 
RDG_Fallos.MasterTableView.Columns.Add(Col_NameSyst); 
Col_NameSyst.DataField = "idSystem"
Col_NameSyst.HeaderText = "System"
Col_NameSyst.UniqueName = "System"
Col_NameSyst.DataSourceID = "sdsSystem"
Col_NameSyst.ListTextField = "System"
Col_NameSyst.ListValueField = "idSystem"
Col_NameSyst.DropDownControlType = GridDropDownColumnControlType.RadComboBox; 

En este caso no encontré como cambiarle el skin por default del Grid que es Office2007. Intenté hacelo en el evento ItemCommand de la siguiente manera:

protected void RDG_Fallos_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        GridEditFormItem editFormItem = e.Item as GridEditFormItem; 
        if (e.CommandName == "InitInsert"
        { 
            GridDropDownListColumnEditor rdcSystem = (RDG_Fallos.Columns.FindByUniqueName("System"as GridDropDownColumn).ColumnEditor as GridDropDownListColumnEditor; 
            rdcSystem.ComboBoxControl.Enabled = false
            rdcSystem.ComboBoxControl.Skin = "Vista"
        } 
        else 
        { 
            if (e.CommandName == "Edit"
            { 
                GridDropDownListColumnEditor rdcSystem = (RDG_Fallos.Columns.FindByUniqueName("System"as   GridDropDownColumn).ColumnEditor as GridDropDownListColumnEditor; 
                rdcSystem.ComboBoxControl.Skin = "Vista"
            } 
        } 
    } 
En los dos casos aparentemente cambia el skin pero a la hora de mostrarlo mantiene el del Office2007. Gracias de antemano
y disculpen por escribir en español,

Julio

Julio Lopes
Top achievements
Rank 1
 answered on 05 Oct 2009
1 answer
88 views

I have a webmethod which returns the rows from the query, and passes it as a list.  I am using two classes to assign the values. 

        public class Types  
        {  
            public Types()  
            {  
                this.Defs = new List< Definitions>();  
            }  
            public string Name  
            {  
                get;  
                set;  
            }  
            public int Sort  
            {  
                get;  
                set;  
            }  
            public Definitions Defs  
            {  
                get;  
                set;  
            }  
        }  
        public class Definitions  
        {  
            public string Name  
            {  
                get;  
                set;  
            }  
        } 

 

I am unsure if I am doing this correctly, but this is what I am trying to accomplish.  Each Type is a RadPanelBarItem Parent of a Definition.  There are multiple Types and Definitions.  This is the closest I have come to implementing this in this way. 

 

ObservableCollection<Types> events = e.Result;  
 
   
 
                //find a specific object  
 
                String _type = events.FirstOrDefault().Type;  
 
   
 
                IEnumerable<Types> qry = from c in events  
 
                                             where (c.Type.ToString().Equals(_type))   
                                             orderby c.Sort  
 
                                             select c;  
 
   
 
                int ct = 0;  
 
                if (qry != null)  
 
                {  
 
                    RadPanelBarItem head = new RadPanelBarItem()  
 
                    {  
 
                        Header = _type  
 
                        ,  
 
                        Style = Application.Current.Resources["radPanel_StyleInd"as Style  
 
                    };  
 
                    foreach (Types typ in qry)  
 
                    {  
 
                        if (inc.IsActive == true)  
 
                        {  
 
                            RadPanelBarItem pbi = new RadPanelBarItem()  
 
                            {  
 
                                Name = inc.IncType.ToLower() + "_Def_" + ct   
 
                                ,  
 
                                Style = Application.Current.Resources["radPanel_StyleInd"as Style  
 
                            };  
 
                            pbi.Selected += new EventHandler<Telerik.Windows.RadRoutedEventArgs>(pbi_Selected);  
 
                            head.Items.Add(pbi);  
 
                            ct++;  
 
                        }  
 
   
 
                    };  
 
                        pb.Items.Add(head);  
 
                    }  
 
            }
 
 

 

Right away you can see that it isn’t dynamically adding the head—parent items.  I need it to add the Types as the head, parent items and definitions as child items… any idea how to accomplish this?

übermensch
Top achievements
Rank 1
 answered on 05 Oct 2009
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?