Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
537 views
I have a project with RadAutoCompleteBox and every thing works fine on my localhost, but when I upload it the page doesn't crash but the drop down doesn't appear at all but yet it works fine on my computer.

I have the RadAutoCompleteBox binded to a web service.

When I go to the web service page online I get the following error. 

Cannot serialize member Telerik.Web.UI.AutoCompleteBoxData.Context of type System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], because it implements IDictionary.


Here is my code in the web service.
using ClassLibrary;
// uses the class library
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI.AutoCompleteBox;
using System.Web.Services;
using Telerik.Web.UI;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
 
 
//using System.Collections;
//using System.Runtime.Serialization;
//using System.Runtime.Serialization.Formatters.Binary;
 
 
namespace ReportsViewer.Services
{
    /// <summary>
    /// Web service for telerik autocompletebox
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    [System.Web.Script.Services.ScriptService]
     
    public class StaffWebService : System.Web.Services.WebService
    {
        string QueryData {get; set;}
        string AcademicYear { get; set; }
 
        [WebMethod(EnableSession = true)]
 
        public AutoCompleteBoxData GetStaffNames(object context)
        {
            //Orignal code
            //QueryData = context["Text"].ToString();
            //var AcademicYear = Session["AcademicYear"];
 
            //Testing code
            string QueryData = ((IDictionary<string, object>)context)["Text"].ToString();
            var AcademicYear = Session["AcademicYear"];
 
                using (SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Connect"].ConnectionString))
                {
                cn.Open();
                using (SqlCommand cm = cn.CreateCommand())
                {
                    cm.CommandText = "sql stuff";
                     
                    cm.Parameters.AddWithValue("@QueryData", QueryData);
                    cm.Parameters.AddWithValue("@AcademicPeriod", AcademicYear);
                     
                    using (SqlDataAdapter objAdpt = new SqlDataAdapter())
                    {
                        objAdpt.SelectCommand = cm;
 
                        using (DataTable dt = new DataTable())
                        {
                            objAdpt.Fill(dt);
                            dt.DefaultView.Sort = "Name";
 
                            List<AutoCompleteBoxItemData> result = new List<AutoCompleteBoxItemData>();
                            AutoCompleteBoxData dropDownData = new AutoCompleteBoxData();
 
                            result = new List<AutoCompleteBoxItemData>();
 
                            for (int i = 0; i < dt.Rows.Count; i++)
                            {
                                AutoCompleteBoxItemData itemData = new AutoCompleteBoxItemData();
                                itemData.Text = dt.Rows[i]["Name"].ToString();
                                itemData.Value = dt.Rows[i]["WINDOWS_USER_ID"].ToString();
 
                                result.Add(itemData);
                            }
 
                            dropDownData.Items = result.ToArray();
                            return dropDownData;
      
                        }
                             
                    }
                         
                     
                }
 
            }
        }
         
    }//end of class
}//end of namespace

Cheers

John Moore
David
Top achievements
Rank 1
 answered on 10 Jan 2017
3 answers
60 views

Hi!

I encountered a weird phenomenon when using the SingleClick feature of the RadButton

<div class="footer" dir="rtl">
    <telerik:RadButton RenderMode="Lightweight" runat="server" ID="buttonSave"  Text="Speichern" SingleClick="true" SingleClickText="Speichere .." CausesValidation="False" OnClick="buttonSaveClicked" />
    <telerik:RadButton RenderMode="Lightweight" runat="server" ID="buttonCancel" Text="Abbrechen" SingleClick="true" SingleClickText="Abbrechen .." CausesValidation="False" OnClick="buttonCancelClicked" />
</div>

 

When I click one of the buttons the displayed text is changing for the time of the PostBack, but the text shown is: ".. Speichere" and ".. Abbrechen" instead of the dots being after the string. When I set the SingleClickText to have letters after the dots it's shown correctly. The amount of dots don't change anything, neither do spaces between the dots and the normal text or after the dots.

In addition to that JS-Console says "no element found" when the button is clicked.

Is that a bug or am I missing something important?

Thanks already

Greetings Felix

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 10 Jan 2017
7 answers
559 views
I would like my RadScheduler to appear in the 24 hours mode (that can be achieved with aTelerik.Web.UI.SchedulerNavigationCommand.SwitchFullTime command) -- But I don't want to do this as a result of any navigation, I just want to set it either in the ASPX declaration or on the server-side during initialization.

How do I do this?
Peter Milchev
Telerik team
 answered on 10 Jan 2017
7 answers
233 views

Can anyone please advise why RadColorPicker appears on our web pages like the attached image ?

This happens in both IE11 and Chrome when the page first appears.

Interestingly, if the browser page is refreshed, the color picker appears properly sized.

Coding (embedded in a Bootstrap panel, although I don't think this is related):

<div class="panel panel-default">
    <div class="panel-heading"><asp:Label ID="lblAddEditStep" runat="server"></asp:Label></div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-2 coursenames" style="vertical-align:top"><asp:Label ID="lblStepColour" runat="server"></asp:Label></div>
                    <div class="col-sm-10 coursenames" style="padding-left:20px">
                        <telerik:RadColorPicker ID="radColourPicker" runat="server"></telerik:RadColorPicker>
                    </div>

                </div>

            </div>
        </div>

</div>

Thankyou

Shawn
Top achievements
Rank 1
 answered on 10 Jan 2017
1 answer
137 views

Hi,

 

When using Mobile rendermode the height of the menu is always derived from the first level.

The menu's height is not reset when browsing to lower levels.

 

So if for instance we have one item on first level and five on second, there will always be a scrollbar.

Why is that?

 

Marc

Dimitar
Telerik team
 answered on 10 Jan 2017
1 answer
151 views

Hi,

We just update Telerik 10 to new version "2016.3.1027.45"

After installing existing functionality breaking. At the run time automatically .xsd file attaching mention on fig-1.

Rad Scheduler control event width property are shrink.

Detail mention on attach document.

 

Thanks

 

 

 

Ivan Danchev
Telerik team
 answered on 10 Jan 2017
5 answers
1,000 views
Hi,

I have a requirement to capture a image from webcam of Lap/PC and the captured image should be displayed in image editor  with edit mode should be gave provision to crop the image after that image should be shown in image panel 

How to do this one using asp.net web application .Any suggestions 

Thanks,
Shrikant
Top achievements
Rank 1
 answered on 10 Jan 2017
1 answer
102 views

While in Batch Edit mode I have a Hierarchy. 

If there is only ONE record in the detail table and I edit a value (textbox, datepicker, etc.)

Then if I move on to save changes, the record that I just edited DOES NOT update.

It appears to me that the record or the detail table the record is in WILL NOT transition out of edit mode. 

This behavior is making it impossible to edit a record if there is ONLY ONE record in the detail table. 

Any advise would be appreciated.

Thank you

Kostadin
Telerik team
 answered on 10 Jan 2017
3 answers
809 views

Hi, I have a RadGrid with a text box called "Cause" where users can input whatever "Cause they wish.

Now I want to restrict inout by using a Dropdown, 

<telerik:GridTemplateColumn DataField="Cause" HeaderText="Cause" UniqueName="Cause">
                    <ItemTemplate>
                    <%# Eval("Cause") %>
                </ItemTemplate>
                <EditItemTemplate>
                            <telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="RadDropDownList1"  DataTextField="Cause"
                                DataValueField="Id" SelectedText='<%#Bind("Cause")%>' DataSourceID="sqlDSOutOfStockTest">
                            </telerik:RadDropDownList>
                                        </EditItemTemplate>
                       
                 </telerik:GridTemplateColumn>

The only thing not working is that when I try to edit an existing record the Dropdown shows the first record in the Dropdown list , not the actual value I chose. What is it that I am not doing right?

I'm using VB.

Anders
Top achievements
Rank 1
 answered on 10 Jan 2017
8 answers
803 views

I want to fill my radcombobox with grouping like category and items which should get from database.
Please find the attachment for the reference
example :
category1
   --Item1
   --item2
Category2
   --item1
   --item2
Category3
    --item1
    --item2
    --item3

Thanks
Prathap
Nencho
Telerik team
 answered on 10 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?