Telerik Forums
Kendo UI for jQuery Forum
2 answers
432 views
I have been struggling to bind an AutoComplete datasource to an AspNet web service throughout the day. But the web service is not called at all. The error routine shows "Internal Server Error" alert.

Both the web page and the web service are in a folder named "AutoComplete" under the root directory.
Could anybody please help me?

Client-Side Code:

<script type="text/javascript">
        var _rootUrl = '<%=string.Format("{0}{1}/", Request.Url.GetLeftPart(UriPartial.Authority), HttpRuntime.AppDomainAppVirtualPath)%>';
    </script>
    
    <script type = "text/javascript">
    
        $(document).ready(function () 
        {
            $("#TxtName").kendoAutoComplete(
            {
                change: function (e) 
                {
                    alert(e);
                    onChange(e);
                },
                minLength: 1,
                dataTextField: "Name",
                filter: "contains",
                dataSource: new kendo.data.DataSource(
                {
                    type: "json",
                    transport: 
                    {
                        read: 
                        {
                            type: "POST",
                            url: _rootUrl + "AutoComplete/WebService2.asmx/GetEmployeesNames",
                            contentType: 'application/json; charset=utf-8',
                            datatype: "json",
                            data: function () 
                            {
                                alert($("#TxtName").data("kendoAutoComplete").value());
                                return 
                                {
                                    Param: $("#TxtName").data("kendoAutoComplete").value()
                                }
                            } // data
                        }, //read
                        parameterMap: function (options) 
                        {
                            alert(options);
                            return JSON.stringify(options);
                        } // parameterMap
                    }, // transport
                    serverFiltering: true,
                    serverSorting: true,
                    pageSize: 10,
                    schema: 
                    {
                        data: "d"
                    },
                    error: function(e) 
                    {
                        var xhr = e[0];
                        var statusCode = e[1];
                        var  errorThrown = e[2];
                    
                        alert(xhr);
                        alert(statusCode);
                        alert(errorThrown);
                    }
                })
            }) 
      });
   
    </script>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID = "TxtName" runat = "server" />
    </div>
    </form>
</body>

Web Service:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class WebService2  : System.Web.Services.WebService 
{
    public class Employee
    {
        private int _Id;
        private string _Name;
        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        public Employee() { }
        public Employee(int Id, string Name)
        {
            this.Id = Id; this.Name = Name;
        }
    }

    public WebService2() { }

    [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
    [WebMethod]
    public List<Employee> GetEmployeesNames(string Param)
    {
        string StrConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringEmployeesNormalized2"].ConnectionString;
        SqlConnection SqlConnection1 = new SqlConnection(StrConnectionString);
        SqlCommand SqlCommand1 = new SqlCommand("SELECT Id, Name FROM dbo.Employees Where Name Like '" + Param.Trim() + "%'", SqlConnection1);

        DataTable DataTable1 = new DataTable();
        SqlDataAdapter SqlDataAdapter1 = new SqlDataAdapter(SqlCommand1);
        SqlDataAdapter1.Fill(DataTable1);

        List<Employee> List1 = new List<Employee>();
        foreach (DataRow DataRow1 in DataTable1.Rows)
        {
            List1.Add(new Employee(Convert.ToInt32(DataRow1["Id"]), Convert.ToString(DataRow1["Name"])));
        }

        return List1;
    }
}

Sakthivel
Top achievements
Rank 1
 answered on 14 Jun 2012
2 answers
216 views
MVVM binding, json has 10 columns, I only need to show 5 of those...

I've tried "visible" or "width" on the header bindings with no success...can it be done?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 14 Jun 2012
2 answers
138 views
Hi. 

We are looking at Kendo UI for our new web offering. 
We have grids in our system which can easily contain 100K rows or more.
We do not want paging.  We want to be able to scroll across all rows without interruption.

I modified the basic grid example to generate 100K rows and set the page size to 100K.
The grid took around 4 minutes to load and then was unresponsive to user interaction.

Is there a way to specify a true virtual mode so that the data source size becomes unimportant?

Take care,

Ken Rubin
Ken Rubin
Top achievements
Rank 1
 answered on 14 Jun 2012
2 answers
140 views
What am I doing wrong here...?  syntax problem perhaps?  It's properly 3 times, but the name only shows up twice, and it's not binding the children to the proper area.
http://jsfiddle.net/stevescotthome/NsSks/3/

Seems straight forward?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 14 Jun 2012
1 answer
156 views
Hi

is there any animation that can be applied to the row-template of the grid when rendering the rows from search keypress scernario.

 the desired effect would be a staggered row render type effect

or any animation of anykind that can be applied to the grid rendering on the page - (NOT loading animation)

thanks in advance

Richard J
Iliana Dyankova
Telerik team
 answered on 14 Jun 2012
0 answers
65 views
Hi All
I have two grids on one page. If I try to sort the first grid, die cloumn on the second grid are disappearing. If if then sort a cloumn one the second grid teh data are back again. grid obj ids are different. DataSorce variables are diffrent. So this is a strange effect.

How can I configure each grid, so that they are not effecting each other when sorting ?


With kind reagrds
Gerd
Gerd
Top achievements
Rank 1
 asked on 14 Jun 2012
1 answer
585 views
I have a list view that I have created.  I would like to trigger an event when an item in the list view is double clicked.

To do this, I have the following template:
<script id="uxMyTemplate" type="text/x-kendo-tmpl">
        <div class="cwcs_listItem" data-id="${ID}">
            <h2>${Name}</h2>
            <p>
                ${Description}
            </p>
        </div>
    </script>

And the following function to register the event:
function _setItemDoubleClickEvent() {
    var items = $(".cwcs_listItem");
    items.dblclick(function() { alert("Double Click!"); });
}

Unfortunately this doesnt do me any good before the data has been retrieved and the template rendered in the list view.
My question is: Is there an event I can register for which will be called when a kendo control has finished rendering a template?
Iliana Dyankova
Telerik team
 answered on 14 Jun 2012
1 answer
108 views
Hi,

I have created a kendo grid, with its inline editing enabled. I just created a demo from js fiddle. But, i am not getting the edit and delete buttons. They are coming as undefined. If i include kendo.web.min.js it works. Also, if i add kendo.web.js it doesnt work. Is it required to add? I am attaching the demo. Please tell me, what am i missing here.

Regards,
Khushali
Alexander Valchev
Telerik team
 answered on 14 Jun 2012
0 answers
366 views
Here is the scenario, I'm building a dynamically changing layout site based on the resolution of the screen. I switch between a panelbar and menu depending on my width. Now this works great on my desktop and my mobile phone (myTouch 4g). It does not work on my Kindle Fire or Galaxy Tab 10.1. On the tablets if I tell the lists to be hidden by default and choose to show one based on the screen size it doesn't do anything. If I display both by default and hide the one I don't want all it does is remove all the formatting from the list I want to hide. I've ripped out the .kendoPanelBar() and .kendoMenu() from my scripts and everything functions as it should on all devices. Unless someone has a better idea is there a fix for this issue?

EDIT: I have tried to use jQuery show/hide and creating a class that I just add or remove. Both have the same result.

EDIT2: I got this working. For some reason I have to apply my show hide settings prior to setting the .kendoPanelBar or .kendoMenu in my $(document).ready function.
Alan
Top achievements
Rank 1
 asked on 13 Jun 2012
0 answers
136 views
HI,

I have placed asp.net login control inside the kendo ui. i tried to get the button click work. it is failing to authenticate or post back to server.

The button inside the window has become useless.

 <script>
           $(document).ready(function () {
              

             var window = $("#window").kendoWindow();
             var button = $("#robo");
             var buttonLogIN = $("#LoginButton");
             button.show();
             window.hide();
             var onClose = function () {
                 undo.show();             
             }
             button.bind("click",function ()
             {                
                 window.show();
                 window.data("kendoWindow").open();
                 window.data("kendoWindow").center();
             })
             buttonLogIN.bind("mousedown", function () {                
                 window.show();
                 window.data("kendoWindow").open();
                 window.data("kendoWindow").center();
                 window.data("kendoWindow").closest("#window").appendTo("form");
         
             })

               if (!window.data("kendoWindow")) {
                   window.kendoWindow({
                       width: "300px",
                       height: "200px",
                       title: "About Alvar Aalto",
                       close: onClose
                   });
               }
              
           });
            </script>


digish devassy
Top achievements
Rank 1
 asked on 13 Jun 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?