Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
253 views
I have a rad date time picker in my website which shows time from 12:00 AM to 11:00 PM
When user selects date, the time is set to 12:00 AM automatically.
I want this time to be 7:00 AM instead of 12:00 AM.
Also i want to show complete 24 hr time like it was showing it before (12:00 AM to 11:00 PM).
Kindly provide some solution.
Kavita
Top achievements
Rank 1
 answered on 19 Aug 2014
1 answer
153 views
Hi,
I have two RadComboBoxes controls on my page. The first RadComboBox items is loaded via Server-side code. But the second RadComboBox items is always reflected once user change the first RadComboBox and this RadComboBox has multiple selection with checkbox inside each items. I want to achieve that the second RadComboBox items is loaded via Javascript query against a variable without any request to server. Once the user submit the form, the multiple selections on the second RadComboBox can be recognized in the server. How can I achieve that way?
Any help would be greatly appreciated.
Thank you.

Regards,
Darius
Darius
Top achievements
Rank 1
 answered on 19 Aug 2014
2 answers
125 views
Hi,

I am using telerik version 2013.3.1324.35. I used scheduler with multiple resources. I use OnClientAppointmentMoveEnd to get the resource when they moved the slot. Below is the function I am using. It seems like function is calling twice. When first time fires, I can get the correct tutor. But on second time , it seems like it is getting the original tutor before moving. Is there anything I can do?  Thanks in advance.

function OnClientAppointmentMoveEnd(sender, eventArgs) {
               debugger;
               var appointment = eventArgs.get_appointment();
               var recurrState = appointment.get_recurrenceState();
               var slotElement = $telerik.$(eventArgs.get_targetSlot().get_domElement());
 
               $get('<%= hid_oldstart.ClientID %>').value = formatDate(appointment.get_start());
               $get('<%= hid_oldend.ClientID %>').value = formatDate(appointment.get_end());
 
               if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
                   eventArgs.set_cancel(true);
               }
 
             
               // Calculate the duration of the appointment
               var appointmentDuration = appointment.get_end() - appointment.get_start();
 
               // The new start time is provided in the event arguments              
               var newStartTime = eventArgs.get_newStartTime();
 
               // Add the duration of the appointment to the new start time to get the new end time
               var newEndTime = new Date(newStartTime.getTime() + appointmentDuration);
               var editSeries = eventArgs.get_editingRecurringSeries();
 
              
               if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled") || slotElement.is(".ReasonDisabled") || slotElement.parent().is(".ReasonDisabled")) {
                   eventArgs.set_cancel(true);
                   radalert('Moving appointment to this slot is not allowed'
                       , 330, 180, 'Warning!', alertCallBackFn, imgUrl); return false;
               }
               else {
 
                   var list = appointment.get_attributes();
                   var attr = list.getAttribute('TutorID');
 
                   //debugger;
                   var targetResource = eventArgs.get_targetSlot().get_resource();
                   var newTutor = targetResource.get_key();
                   attr = newTutor;
                   var aptAttributes = appointment.get_attributes();
                   aptAttributes.removeAttribute("TutorID");
                   aptAttributes.setAttribute("TutorID", newTutor);
                   appointment.set_start(newStartTime);
                   appointment.set_end(newEndTime);
 
                   var state = appointment.get_recurrenceState();
 
                   $get('<%= hid_movedendStd.ClientID %>').value = formatDate(newStartTime);
                   $get('<%= hid_moveendEtd.ClientID %>').value = formatDate(newEndTime);
                   $get('<%= hid_moveendTutor.ClientID %>').value = newTutor;
                   //alert(newTutor);
 
                   var myarr = new Array();
                   myarr[0] = "movedend";
                   myarr[1] = formatDate(newStartTime);
                   myarr[2] = formatDate(newEndTime);
                   myarr[3] = newTutor;
                alert(newTutor);
 
 
                   $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(myarr);
 
 
 
 
 
                  
               }
             
           }

Best regards,
Ei
Ei Wai
Top achievements
Rank 1
 answered on 19 Aug 2014
1 answer
95 views
Upon using a Radformdecorator custom Metrotouch skin, we noticed radio’s and checkboxes don’t show  on chrome browser.
      
Using Chrome
36.0.1985.143 m
    
Downloaded latest
Telerik_UI_for_ASP.NET_AJAX_2014_2_724_Dev_hotfix.zip

We have found some ‘errors’ in css
    
Missing ‘!important’ declarations     

After this radio’s and checkboxes work again.
@media screen and (-webkit-min-device-pixel-ratio:0) {
 
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"] {
    background-repeat: no-repeat;
    background-position: 0 3px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"]:hover {
    background-position: -40px 3px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"]:checked {
    background-position: 0 -37px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"]:hover:checked {
    background-position: -40px -37px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"][disabled], .RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"][disabled]:hover {
    background-position: 0 -117px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"][disabled]:checked, .RadForm_MetroTouchNeutral.rfdCheckbox input[type="checkbox"][disabled]:checked:hover {
    background-position: 0 -157px!important;
}
.RadForm_MetroTouchNeutral.rfdRadio input[type="radio"] {
    background-repeat: no-repeat;
    background-position: -80px 3px!important;
}
.RadForm_MetroTouchNeutral.rfdRadio input[type="radio"]:hover {
    background-position: -120px 3px!important;
}
.RadForm_MetroTouchNeutral.rfdRadio input[type="radio"]:checked {
    background-position: -80px -37px!important;
}
.RadForm_MetroTouchNeutral.rfdRadio input[type="radio"]:hover:checked {
    background-position: -120px -37px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="radio"][disabled], .RadForm_MetroTouchNeutral.rfdCheckbox input[type="radio"][disabled]:hover {
    background-position: -80px -117px!important;
}
.RadForm_MetroTouchNeutral.rfdCheckbox input[type="radio"][disabled]:checked, .RadForm_MetroTouchNeutral.rfdCheckbox input[type="radio"][disabled]:checked:hover {
    background-position: -80px -157px!important;
}
}

Marc
Misho
Telerik team
 answered on 19 Aug 2014
2 answers
58 views
There is a Telerik Rad Combobox which has three events.
OnClientItemRequesting,OnClientItemRequested,OnClientKeyPressing. All the above three events is calling a JS function.

In case of Chrome and Firefox all the three events gets fired on key press and autocomplete opens
In case of all IE only OnClientKeyPressing fire and autcomplete doesn't open

The page doctype is HTML5

Please provide a solution to the above problem

Thanks.
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2014
5 answers
136 views
Is there a method to have the toolbar wrap similar to the menu ?
Ivan Zhekov
Telerik team
 answered on 19 Aug 2014
1 answer
132 views
Hi

I'm using Radgrid to build a tree structure with source of objects with parent and child relationship.
I'm also have a ddl in my page.
Each time I change my selection in the ddl I need to load differnet data to my radgrid.
The problem is the when I change the ddl and one of the node is expanded to more that 1 level I got error:

Specified argument was out of the range of valid values.
Parameter
name: ItemHierarchicalIndex 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.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex

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.

I guess the problem is- the grid is trying to restore the expanded items on the new data source (which has been changed and the expanded levels in client data may not be valid anymore).

Can u help me with solution?
thanks




Angel Petrov
Telerik team
 answered on 19 Aug 2014
1 answer
143 views
Hello,
I want to catch the clicked menu to know de url user has clicked and validate before send this,

protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
    {
       string myitme = RadMenu1.SelectedItem.ToString();

        if (e.Item.Text == "Autorizar")
        {
  
            Response.Write("You has selected Autorizar, You will be redirected to Autorizar.html");
            Response.Redirect("Autorizar.html");
        }
}

Anyone knows how can I do this?
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2014
3 answers
170 views
Hi All,

i have designed my webpage with a raddropdowntree and a RadComboBox . when im clicking on that raddropdowntree , 'EntryAdded' event will fire and a RadComboBox will load. In this event , the page will be blinking. So that i have trying to avoid that. if i will use RadAjaxManager means, the RadDropDownTree  canot be load and accessible. Anybody tell me the solution that, how to avoid flickering  using Rad in webpage while postback. below is the sample code.
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
       <rad:AjaxSetting AjaxControlID="rddtArea">
            <UpdatedControls>
                <rad:AjaxUpdatedControl ControlID="rcmbName">
            </UpdatedControls>
        </rad:AjaxSetting>
    </AjaxSettings>
</rad:RadAjaxManager>
<rad:RadSplitter runat="server" ID="RadSplitter1" Width="100%" BorderSize="0" BorderStyle="None"
    PanesBorderSize="0" Height="100" Orientation="Horizontal">
    <rad:RadPane ID="RadPane1" runat="server" Height="100%">
   <rad:RadDropDownTree ID="rddtArea" runat="server" DropDownSettings-CloseDropDownOnSelection="true"
                        OnEntryAdded="rddtArea_EntryAdded" EnableFiltering="true" FilterSettings-Highlight="Matches"
                        Skin="Outlook" DropDownSettings-Height="100" AutoPostBack="true">
                    </rad:RadDropDownTree>
  <rad:RadComboBox ID="rcmbworkflowtemplate" runat="server" DataValueField="MOCID"
                        AppendDataBoundItems="false" DataTextField="MOCTitle" AutoPostBack="true" OnSelectedIndexChanged="rcmbworkflowtemplate_SelectedIndexChanged">
                  </rad:RadComboBox>
  </rad:RadPane>
</rad:RadSplitter>












Princy
Top achievements
Rank 2
 answered on 19 Aug 2014
6 answers
262 views
Hi,
I am using Telerik Rad Ajax Controls  2013 Q1 NET 40 for our website, Technologies, ASP.NET, VB.

I have a .aspx page with a ajaxified RadPanelBar. There is a RadPanelItem in RadPanelBar which contains controls such as texboxes, combo boxes etc. HTML Tables are used to show controls/fields in each panel. The RadPanelBar is ExpandMode="MultipleExpandedItems". I have a RadAJXManager for the panelbar.

The RadPanelItem has a cascading combo, so the first combox "Manufacture" on select populates the second Combo "Model. I have set a OnSelectedIndexChanged="ddManufacturer_SelectedIndexChanged" to call a code behind code, which correctly populates the Model Combo. The problem I have is that once the Model combo has been populated, the PanelBarItem which was expanded seems to collapse after the postback.
 
Here is a aspx code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadPanelBar1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
</telerik:RadAjaxManager>
    <telerik:RadPanelBar ID="RadPanelBar1" Runat="server"  Skin="Office2007" ExpandMode="MultipleExpandedItems"
                style="margin-right: 80px" Width="90%" PersistStateInCookie="true">
        <Items>                
             <telerik:RadPanelItem runat="server" Text="Device Details">
                 <Items>
                    <telerik:RadPanelItem Value="DeviceDetails" runat="server"  PreventCollapse="false" Text="Device Details">
                         <ItemTemplate>
                             <div class="qsf-fb">
                                 <table  cellspacing="10">                                
                                   <tr>
                                         <td>
                                            <asp:Label runat="server" ID="Label20" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                         <td>
                                             <img alt="Help" src="../Images/help.gif" title="Not Required if Work Authorization = Decommission or TADD4d Exlusion = No,Optional if                                                                 Work Authorization = Changes with Rename/Changes without Rename." />

                                               <telerik:RadComboBox ID="ddManufacturer" runat="server" DataSourceID="SqlZurichManufacture"
                                                            DataTextField="ADCSManufacture" DataValueField="ADCSManufacture"
                                                            Skin="Office2007" CausesValidation="False" Width="220px" MarkFirstMatch="True"
                                                            OnSelectedIndexChanged="ddManufacturer_SelectedIndexChanged"
                                                            AutoPostBack="True" EmptyMessage="Please Select..." EnableScreenBoundaryDetection="False">
                                               </telerik:RadComboBox>  
                                        </td>                                    
                                         <td>
                                             <asp:Label runat="server" ID="Label68" Visible="False" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                        <td>
                                              <telerik:RadTextBox  ID="txtManufacture" CssClass="textInput" ValidationGroup="RefValidation" MaxLength="30" Skin="Office2007"
                                                     runat="server"  Width="220px" Visible="False"></telerik:RadTextBox>
                                                 <asp:RequiredFieldValidator runat="server"  ID="RequiredFieldValidator43"
                                                      ControlToValidate="txtManufacture" ErrorMessage="Manufacture is required" Text="*"></asp:RequiredFieldValidator>
                                         </td>
                                    </tr>
                                    <tr>
                                          <td>
                                            <asp:Label runat="server" ID="Label27" AssociatedControlID="ddModel">*Model:   </asp:Label>
                                         </td>
                                         <td>
                                             <img alt="Help" src="../Images/help.gif" title="Not Required if Work Authorization = Decommission or TADD4d Exlusion = No,Optional if Work Authorization = Changes with Rename/Changes without Rename." />
                                            <telerik:RadComboBox ID="ddModel" runat="server"
                                                            DataTextField="ADCSModel" DataValueField="ADCSModel" 
                                                            Skin="Office2007" CausesValidation="False" Width="220px" MarkFirstMatch="True"
                                                            AutoPostBack="True" EmptyMessage="Please Select..." EnableScreenBoundaryDetection="False">
                                               </telerik:RadComboBox>
<%--                                             <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddModel"
                                                    Display="Dynamic" ErrorMessage="Sub-Business Unit is Required. Please select from dropdown." Font-Names="Cambria"
                                                    Font-Size="small" InitialValue="Please Select...">
                                             </asp:RequiredFieldValidator>--%>
                                         </td>
                                         <td>
                                            <asp:Label runat="server" ID="Label65" Visible="False" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                          <td>
                                              <telerik:RadTextBox  ID="txtModel" CssClass="textInput" ValidationGroup="RefValidation" MaxLength="30" Skin="Office2007"
                                                     runat="server"  Width="220px" Visible="False"></telerik:RadTextBox>
                                                 <asp:RequiredFieldValidator runat="server"  ID="RequiredFieldValidator1"
                                                      ControlToValidate="txtModel" ErrorMessage="Model is required" Text="*"></asp:RequiredFieldValidator>
                                         </td>
                                     </tr>                            
                             </table>
                             </div>
                        </ItemTemplate>
                   </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>                                                                                                                                                                                                                                               </Items>
            </telerik:RadPanelItem>
        </Items>
        <ExpandAnimation Type="InOutBounce" />
    </telerik:RadPanelBar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Here is the code behind code the the cascading combo in the RadPanelBarItem, but this does work perfectly:     

Protected Sub
        ddManufacturer_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
        Dim editedItem As GridEditableItem = TryCast(TryCast(o, RadComboBox).NamingContainer, GridEditableItem)

        ' If 'Other' selected from Manufacture then show text box to allow typing in a value
        If e.Value = "Other" Then
            Dim txtManfu As RadTextBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("txtManufacture"), RadTextBox)
            Dim txtModel As RadTextBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("txtModel"), RadTextBox)
            txtManfu.Visible = True
            txtModel.Visible = True
        End If
        Dim ddModel As RadComboBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("ddModel"), RadComboBox)

        ddModel.Items.Clear()
        ddModel.DataSource = LoadModel(e.Value)
        ddModel.DataBind()

        Dim Panel1 As RadPanelItem = New RadPanelItem
        Panel1 = RadPanelBar1.FindItemByValue("DeviceDetails")
        '.FindItemByValue("ActivityInformation")
        If Panel1.Expanded = False Then
            Panel1.Expanded = True
            Panel1.Enabled = True
            Panel1.Selected = True
        End If
    End Sub                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             To summarize, the RadPanelbar collapses after a postback. Do I need to ajaxify the controls inside the panelbaritem?   I have tried several ideas like setting the PersistStateInCookies to true. Also tried to capture the collapse in the RadPanelBar PreRender    to stop the collapse and other ideas from this forum. Any suggestions would be appreciated. Thank you.
                                                                                








Ed
Top achievements
Rank 1
 answered on 18 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?