Telerik Forums
Kendo UI for jQuery Forum
0 answers
145 views
hello!!!
i hope someone can help me...
i fill a combobox with a variable, but when i push a button, i need to change items in smy comboBox.. this is my code

<script type="text/javascript">
        var combobox;
        var data = [
                        { text: "White", value: "1" },
                        { text: "Black", value: "2" }
                    ];
 $(document).ready(function () {
               combobox = $("#cmb").kendoComboBox({
                dataSource: data,
                dataTextField: "text",
                dataValueField: "value"
 
            }).data("kendoComboBox");
function changeItems (){
 data = [
                        { text: "Blue", value: "1" },
                        { text: "Green", value: "2" }
                    ];
//now i want to change the items of my combobox
}
.... and also
<input type="button" value="Change" id="change" onclick="return changeItems();"/>
how can i do without refresh the page???

thanks in advance
pasquale
Top achievements
Rank 1
 asked on 29 Feb 2012
3 answers
363 views
I see that in the Tab Example we can set animation effects.  However the API dos not seem to have anything listed to configure it.

How do I set the animation effects on a tab?

Kamen Bundev
Telerik team
 answered on 29 Feb 2012
1 answer
111 views
Hi,

is there a way to add/update/delete data or just enter text with any of the kendo ui mobile components.

Let's say I want to force the user to enter a username and password to login.

Or I want to be able to edit the data showed in a listview.

Am I missing something ?

Thanks

Francis
Petyo
Telerik team
 answered on 29 Feb 2012
1 answer
102 views
Is there any way to obtain "Rich html editor" in the Roadmap? I have commercial licence and dont know if its necesary
Thanks
Dimo
Telerik team
 answered on 29 Feb 2012
8 answers
239 views
Hi,

i have an grid with XML binded Datasource. One Column has numeric Data but the grid use alphabetic sort order. Example 1, 100, 2, 200, 3, 300 etc..
Can i use an numeric sort order (1,2,3,100,200,300) ?. How?

The Sourcecode:
$("#grid").kendoGrid({
sortable: true,
selectable: "single",
change: onChange,
            dataSource: {
serverPaging: false,
                serverSorting: false,
                
transport: {
read: {
                        url: "../GetSachbearbeiterListe",
                        dataType: "xml",
                        data: {
                            Suchbegriff: ""
                        }
                    }
                },
schema: {
                    type: "xml",
id: "f07001",
                    data: "/response/update/tabelle/satz",
total: "/response/update/anzahl/text()",
                    model: {
                        fields: {
                            f07001:  { field: "f07001/text()", type: "number" },
                            f07002: "f07002/text()",
f07110: "f07110/text()", 
f07013: { field: "f07013/text()", type: "text" }
                        }
                    }
                }
            },
scrollable: {
                virtual: false
            },
            columns: [{
field: "f07001",
title: "Sb-Nr.",
width: 20
}, {
field: "f07002",
title: "Name",
width: 100
}, {
title: "Status",
width: 30,
template: "#= gContentSachbearbeiter.formatStatusColumn(f07110) #"
}, {
field: "f07013",
width: 70,
title: "Aussendarstellung"
}
]
        });
}
Nikolay Rusev
Telerik team
 answered on 29 Feb 2012
3 answers
144 views
Hi telerik team,

I drew bar chart using basic bar chart sample codes. But I wanna draw bar chart with various colors.
I used stack option and It works. But num value cannot be used like next codes.
Can't I use num value like '1' in X: "1" or  '1':15.7 ?
It occurs errors like attacted file.
Please tell me how to make codes. ^^

<script>
                function createChart() {
    var chartData = [
   { X: "1" , '1':15.7, '2': 0, '3': 0, '4': 0, '5':0},
   { X: "2" , '2':16.7, '1': 0, '3': 0, '4': 0, '5':0},
   { X: "3" , '3':20,   '1': 0, '2': 0, '4': 0, '5':0},
   { X: "4" , '4':23.5, '1': 0, '2': 0, '3': 0, '5':0},
   { X: "5" , '5':26.6, '1': 0, '2': 0, '3': 0, '4':0}
];
                    $("#chart").kendoChart({
     dataSource: {
      data: chartData
   },
                        theme: $(document).data("kendoSkin") || "default",
                        title: {
                            text: "Internet Users"
                        },
                        legend: {
                            position: "bottom"
                        },
                        seriesDefaults: {
                            type: "column",
       stack: true
                        },
                        series:
       [
        { field:"1",  name: "1", color:"red" },
        { field:"2",  name: "2" },
        {   field:"3",  name: "3"     },
        { field:"4",  name: "4" },
        {   field:"5",  name: "5" }
       ],
                        valueAxis: {
                            labels: {
                                format: "{0}%"
                            }
                        },
                        categoryAxis: {
                            field:'X'
                        },
                        tooltip: {
                            visible: true,
                            format: "{0}%"
                        }
                    });
                }

                $(document).ready(function() {
                    setTimeout(function() {
                        createChart();

                        // Initialize the chart with a delay to make sure
                        // the initial animation is visible
                    }, 400);

                    $(document).bind("kendo:skinChange", function(e) {
                        createChart();
                    });
                });
            </script>

Min
Top achievements
Rank 1
 answered on 29 Feb 2012
1 answer
246 views

 public partial class GetAirport : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write(GetAiport(Request.QueryString["apt"]));
        }
        public string GetAiport(string term)
        {
     
              using (D4AgencyModelDataContext dc = new D4AgencyModelDataContext())
              {
                  var citta = (from city in dc.d4agency_Airport_Cities
                               join c in dc.d4agency_Countries
                               on city.Paese equals c.Code
                               where city.Airport.StartsWith(term) && (city.TypeApt.Equals('A') || city.TypeApt.Equals('C'))
                               select new
                               {
                                   city.CodAirport, city.Airport , city.City , c.Description , city.Stato
                               });          

                                             string jsonStr = JsonConvert.SerializeObject(citta);
                  return jsonStr;

              }           
        }
      

    }

Hello i have a porblem whit the autocomplete
in my page :

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="D4Agency.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
    <link href="/Jquery/Kendo/styles/kendo.common.css" rel="stylesheet"/>
    <link href="/Jquery/Kendo/styles/kendo.default.css" rel="stylesheet"/>
   
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
  
    <script src="/Jquery/Kendo/js/jquery.min.js" type="text/javascript"></script>
    <script src="/Jquery/Kendo/js/Kendo.all.min.js" type="text/javascript"></script>
    <script src="/Jquery/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
  
  
   
    <script type="text/javascript">

  
    $(function()
    {
    $("#txtFrom").kendoAutoComplete(
    {
        minLength: 3,
        filter: 'contains',
        severFiltering: true,
        serverPaging: true,
dataTextField: "CodAirport", 
        dataSource:
        new kendo.data.DataSource(
            {
            type: "json",
            transport: {
            read: "/Search/GetAirport.aspx",
                parameterMap: function() {
                return {
                apt: $("#txtFrom").data("kendoAutoComplete").value()
                    };
                }
 
            }
                 
            })
     });

 })
    </script>
<body>

    <form id="form1" runat="server">
    <div>
    <asp:TextBox runat="server" ID="txtFrom"   Width="220px" />
    </div>
    </form>

</body>
</html>

the sistme send me this error :

function anonymous(d, __f, __o) {
return (d.CodAirport.toLowerCase().indexOf('lin') >= 0)
}

 

 

 

 

 

Andrew
Top achievements
Rank 1
 answered on 29 Feb 2012
2 answers
154 views

Is anyone expiencing the problem when using the Metro theme that textboxes seem to get some weird padded border. When adding an autocomplete, it gets even worse.

I'm not applying any CSS at all. The sample attached was a new site. The top image is when hovered over.

Here is the code:

<form id="frmSearch" method="get" action="@Href("~/collections/search")" class="btnSearch">
    <input id="txtSearch" type="text" name="q" placeholder="@defaultValue" class="k-textbox" style="width:40%;" required />
    <button class="k-button dark" id="btnSearch">
        search</button>
    </form>

Here is the JS:

// Search box.
    $("#txtSearch").kendoAutoComplete({
        change: onSearchClick,
        minLength: 3,
        dataTextField: "title",
        delay: 400,
        dataSource: new kendo.data.DataSource({
            type: "json",
            pageSize: 10, // Required to prevent caching.
            serverFiltering: true, // Required to prevent caching.
            serverPaging: true, // Required to prevent caching. 
            transport: {
                read: getRootDomain() + "/findTitles",
                parameterMap: function (options) {
                    return $.extend(options, {
                        title: $("#txtSearch").data("kendoAutoComplete").value()
                    });
                }
 
            }
        })
    });
    // Initialize and configure the input validator for the search box (on collection page).
    var validator = $("#frmSearch").kendoValidator({
        rules: {
            custom: function (input) {
                // Prevent anything under 3 characters from being allowed.
                return input.val().length > 2;
            }
        },
        messages: {
            custom: "You need 3 or more charactors"// Shows when <3 character is entered.
            required: "Oops, you forgot me!" // Shows when the search box is left blank.
        }
    }).data("kendoValidator");
    $("#btnSearch").click(function () {
        if (validator.validate() == false) {
        }
    });

 
EDIT: also the documentation for the validator regarding the SPAN tag to fix alignment does not work in the above situation.
The attached image icon on this post says it is a GIF when it is a PNG

Gabriel
Top achievements
Rank 1
 answered on 29 Feb 2012
0 answers
72 views
I've styled my textbox to have a button to search - pretty much identical to functionality and layout to Bing.
Problem is, the autocomplete drop-down list with suggestions is only the width of the input box - how would I add some extra width to it to account for the width of my search button?

Also, how do I set the height to be large enough to fit ALL the suggestions, including any the have been wrapped to another line?
Gabriel
Top achievements
Rank 1
 asked on 29 Feb 2012
3 answers
87 views
Where are the questions & answers I can take a look at from the webinar this past week?

The administrtor of the webinar said he was going to post them to the web site...   
John
Top achievements
Rank 1
 answered on 29 Feb 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?