Telerik Forums
Kendo UI for jQuery Forum
2 answers
185 views
Hello fellow Kendo's,

sorry to be n00by, probably it's very simple...
I am trying to read out a value of a dropdown-list to pass to a php file for mysql query...

Attached is the file, you can also see it live here:
http://www.trinamic.com/psearch/

Upon selecting a motor type, i can already coax out an alert, but how do i get the value in there?

I've tried a variety of stuff:
(motor.text());

and

var mdropdownlist = $("#motor").data("kendoDropDownList");
var text = mdropdownlist.text(); 

but to no avail...

Can anyone help? It would be much appreciated ; )


Kind regards from Germany, Ubbo
Jan Ubbo
Top achievements
Rank 1
 answered on 20 Mar 2012
1 answer
98 views
When a dropdown menu overlaps another control, selecting an option will also execute the click command of that control.  This applies to the combobox and autocomplete as well.

To duplicate:

1. go to the dropdownlist demo
2. click on the "Cap Size" menu
3. select "M - 7 1/4" by putting your finger on the text
4. This will also click on the "customize" button

This is probably just part of dealing with touch devices, but I am wondering if you can give some suggestions for a work around.  I was thinking maybe disabling other controls when the menu is open and then re-enabling them.  I'm going to play around with it but just wanted to get any ideas Telerik support or the community might have.
Georgi Krustev
Telerik team
 answered on 19 Mar 2012
0 answers
102 views
Hi,

i create this to get grid info from mysql database:

<div id="grid"></div>
 <script>
             
                 
                $(document).ready(function() {
                    $("#grid").kendoGrid({
                        dataSource: {
                                                 
                            transport: {
                                read: {
                                    url: "page.php",
                                    type: "post",
                                    dataType: "json"
                                }
                            },
                            schema: {
                                 
                                data: "data",
                                total: "pageSize"
                                 
                            },
                            pageSize: 200,
                            serverPaging: true,
                    serverSorting: true
                        },
                        
                         
                         
                        height: 450,
                        scrollable: true,
                        groupable: true,
                        sortable: true,
                        filterable: true,
                        pageable: true,
            selectable: "multiple row",
                         
                        columns: [
                            {
                                field: "sel",
                                template: "<input type=\'checkbox\' id=\'select\' name=\'sel\' value=#=ARTICLE_ID#  />",
                                filterable: false,
                                sortable: false,
                                groupable: false,
                                width: 50
                            },
                            "CODE",
                            
                            {
                                field: "CATEGORY_NAME",
                                title: "CATEGORY"
                                 
                            }
                            ,
                            "ARTICLE_NAME",
                                 
                            {
                                field: "edit",
                                template: "<a class=\'link_page\' href=\'/gestionale/factory/article/edit/id/#=ARTICLE_ID#\'>Edit</a>",
                                filterable: false,
                                sortable: false,
                                groupable: false,
                                width: 50
                            },
                        ]
                    });
                });
            </script>

my page.php

i do a query with an inner join

select a.NAME as ARTICLE_NAME,a.CODE,c.NAME as CATEGORY_NAME from T_ARTICLE as a inner join T_CATEGORY as c on a.CATEGORY_ID = c.ID

i do serverSorting because the table have more rows (300.000). When i click on TH CATEGORY_NAME the script run a ajax call to page.php and passes through POST the sort array  with the FIELD CATEGORY_NAME, but the query is wrong because in ORDER clause i don't insert CATEGORY_NAME, i would insert c.NAME. 
Is it possible to define the name of the fields that i will use in the sort and filter?

Thanks 



 
Roberto
Top achievements
Rank 1
 asked on 19 Mar 2012
1 answer
35 views
Hello,
I use a Grid with a XML datasource. When some elements in the xml are ' ' instead of strings, the corresponding cell shows 'undefined' with IE. The same site with Firefox shows the space character.
Is there a workaround in the grid definition or in the XML ?
Regards
Rosen
Telerik team
 answered on 19 Mar 2012
3 answers
226 views
I have been trying many ways to bind the listview to an ASP.Net .asmx web service. I have attached the code for both the consuming page and the web service.

I have tried many different ways to return the data from the web service and event tried to just return a string array. The listview works if you bind it to the static flatData var.

Any help or examples would be great!

R

Client side:

</

 

head>

<

 

body>

<form id="form1" runat="server">

<div data-role="layout" data-id="mxl" data-platform="ios">

<div data-role="header">

MobileXus Header

</div>

<div data-role="footer">

iOS MobileXus Footer

</div>

</div>

<div data-role="view" id="flat" data-init="mobileListViewDataBindInitFlat" data-title="ListView" data-layout="mxl">

<ul id="listview">

</ul>

</div>

<script type="text/javascript">

 

var flatData = ["Sashimi salad", "Chirashi sushi", "Seaweed salad", "Edamame"];

function mobileListViewDataBindInitFlat() {

$(

"#listview").kendoMobileListView({ dataSource: flatData });

}

var deviceJDS = new kendo.data.DataSource({

transport: {

read: {

contentType:

"application/json; charset=utf-8",

type:

"POST",

data:

"{}",

dataType:

"json",

url:

"WebServices/TestService.asmx/GetList"

}

}

});

var app = new kendo.mobile.Application();

</script>

</form>

</

 

body>

</

 

html>



Web service:

///

 

<summary>

///

 

Summary description for TestService

///

 

</summary>

[

WebService(Namespace = "http://tempuri.org/")]

[

WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

// 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 TestService : System.Web.Services.WebService {

public TestService () {

//Uncomment the following line if using designed components

//InitializeComponent();

}

[

WebMethod]

[

ScriptMethod(ResponseFormat = ResponseFormat.Json)]

public Array GetList() {

DeviceSvc.

Device dsvc = new DeviceSvc.Device();

DeviceSvc.

Device1[] devices = null;

ArrayList devlist = new ArrayList();

devices = dsvc.SelectAll();

foreach (DeviceSvc.Device1 d in devices)

{

devlist.Add(d.Name);

}

string[] data = { "Rod", "Karen", "Jamie", "Christopher" };

return data;

}

}

Alexander Valchev
Telerik team
 answered on 19 Mar 2012
6 answers
959 views
I m having a kendo grid in my page. I need to search the data from the controller using external search. So i set the serverFiltering of datasource to true for that. Its working wonderfully. But I need to enable Grid filtering also. So I set the filterable to true. Here comes the problem the grid's bult in grid filtering functionality is not working when I set the server filtering to true. Its always post to the controller. When I set the server filtering   to false its working. Here's my datasource

ds= new kendo.data.DataSource({
                transport: {
                    read: {
                        url: 'method',
                        dataType: "json",
                        type: "POST",
                        contentType: "application/json; charset=utf-8"
                    },
                    parameterMap: function (options) {                    
                        return JSON.stringify({ filter: options });
                    }
                },
                schema: {
                    model: {
                        fields: {
                            Id: { type: "number" },
                            Name: { type: "string" },
                            Age: { type: "number" },
                            BeginDate: { type: "date" },
                            EndDate: { type: "date" },
                            Mode: { type: "string" }
                        }
                    }
                }
            });

Also when I set the serverfiltering to false. Its working fine. But for both the date fields its throwing format error  when filter by dates.
In my grid's row template I am showing the date by format it by.
 <td># if(EndDate!=null){# #= kendo.toString(toDate(EndDate), "MM/dd/yyyy")#  #} else {# ${EndDate}#}#</td>

Can anyone figure this out???
John Thompson
Top achievements
Rank 2
 answered on 19 Mar 2012
1 answer
168 views
Hi,

I downloaded from my premium telerik account, the kendoUI library.

But I can't find localization resources in the download or anywhere else?

Where is it? 

Something like kendo.culture.fr-FR.js ?

Thank you!
Georgi Krustev
Telerik team
 answered on 19 Mar 2012
0 answers
53 views
How do I connect the selected data of a line to the data of a window? (see image).

Thanks,
Mike
Mike
Top achievements
Rank 1
 asked on 19 Mar 2012
0 answers
272 views
Hi Admin,

How do we ensure that kendo.parseFloat()/parseIntt() 
method able to parse given formatted input?
Suppose it user gives the string instead of formatted value then how we recognize that its invalid input give by user and kendo.parseFloat()/parseIntt()  
will not be able to parse it?

kendo.parseFloat()/parseIntt()  
 will throw any exception in javascript in case of invalid input

Jitendra
Top achievements
Rank 1
 asked on 19 Mar 2012
1 answer
176 views
Is there an event to know when the content of a window (when loading content through Ajax) has finished loading?


Kind regards,
Alex Gyoshev
Telerik team
 answered on 19 Mar 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
AICodingAssistant
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
+? 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?