Telerik Forums
Kendo UI for jQuery Forum
0 answers
165 views
Hi,

  I have to do a multiselect option in my mobile website (asp.net, c#) using kendo.

How to Multiselect in dropdownlist using in mobile UI?



Regards

Mukesh
mukesh
Top achievements
Rank 1
 asked on 02 Jul 2012
6 answers
366 views
I have what I believe is a fairly common and straight-forward scenario that I am trying to figure out with Kendoui Mobile:

First I display a ListView is retrieves data from a Web Service via the Datasource object to display a list of Customers.  I use a template here to add a link:

<script id="MyCustomersTemplate" type="text/x-kendo-template">
    <a href="CustomerDetailView?ID=#= ID #">
    <div style="font-weight:bold;">#= Name #</div>
    <div style="font-weight:normal;font-size:smaller">#= City #, #= State #</div>
    </a>
</script>

When you click on a customer, I navigate to a new MobileView called CustomerDetailView - where I would like to display the following:

Customer Name, Address and other simple information
List of Contacts (in a ListView)
List of Sales (also in a ListView)

I can't seem to find an example that shows how this would work.  Here is where I am at right now:

<div data-role="view" data-transition="overlay" data-title="Customer Detail" id="CustomerDetailView"
    data-show="getCustomer">
    <!-- What Do I put here ?? -->
</div>

And on the show event of the MobileView I retrieve the data:

function getCustomer(e) {
    var wsParams = {
        "ID": e.view.params.ID
    };
    var dsCustomerDetail = new kendo.data.DataSource({
        transport: {
            read: {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: virtualDirectory + "/CRM/GetClientInfo.asmx/Read",
                dataType: "json",
                data: { callParams: wsParams }
            },
            parameterMap: function (options) {
                return kendo.stringify(options);
            }
        },
        schema: {
            data: "d"
            // How do I setup the Datasource to expose multiple collections (i.e Contacts and Sales) from this web service, without having to call it multiple times for each control databind?
        }
    });
 
    // How do I now get this data onto the MobileView?  Can I use a Template?
}

Attached is a screenshot of part of the JSON data that is returned by the web service, to give you an idea what I am dealing with here.
Alexander Valchev
Telerik team
 answered on 02 Jul 2012
3 answers
226 views
Hi ,

I am looking for using MVC4 web api from Kendo Grid for asp.net mvc. When I use Kendo MVC grid with apicontroller I am not  getting the DataSourceRequest object in my web api controller like normal controller? Do you know how can I use Kendo grid with MVC4 Wep Api  without writing any ad-hoc java scripts or server side code   to get the data to and fro from grid and server and make paging, filter and sorting working optimally?

Thanks,
Alvin George
Jesse
Top achievements
Rank 2
 answered on 02 Jul 2012
0 answers
116 views
Hi,
Basically IE7 & 8 issue.
Kendo splitter resize event handler is getting called when i am applying kendo drop down control on an element.
This causes a javascript error saying, "unable to get value of the property 'offsetwidth' object is null or undefined".
Any help is appreciated.
Deepak
Top achievements
Rank 1
 asked on 02 Jul 2012
2 answers
270 views
Hi,

I'm trying to recreate the styling of the grid in CRM2011. I've got almost everything done. One thing I'm not able to do is to highlight the sorted column by changing its background colour. Is there a way to do this?
Richard
Top achievements
Rank 1
 answered on 02 Jul 2012
5 answers
266 views
Is possible to set a combobox editable property to false? I tried it but, it doesn't work.. the problem is when I open a combobox in my ipad is impossible to select an option.. that's getting crazy! .. and the same thing occurs with datepicker
Ivan Zhekov
Telerik team
 answered on 02 Jul 2012
1 answer
187 views
Hi

I cannot find any equivalent issue/documentation/howto on my specific data structure.

I am getting an invalid template"

Please advise...

Code:

     <div id="example" class="k-content">
                <script id="template" type="text/x-kendo-template">
                <li class="Notice">
                <table style="width: 100%;">
                <tr><td>#= guid#</td><td>#= category#</td><td>#= pubDate#</td></tr>
                <tr><td>#= title#</td><td colspan="2">#= description#</td></tr>
                <tr><td>#= ip:Type#</td><td>#= ip:TimeDown#</td><td>#= ip:ETTR#</td></tr>
                <tr><td>#= ip:Progress#</td><td>#= ip:AreasAffected#</td><td>#= ip:Status#</td></tr>
            </table>
                </li>
            </script>
            <script type="text/javascript">
                $(document).ready(function () {
                    var template = kendo.template($("#template").html());
                    var dataSource = new kendo.data.DataSource({
                        transport: {
                            read: "http://www.telkomsa.net/rss/saix.xml"
                        },
                        schema: {
                            type: "xml",
                            data: "/item",
                            model: {
                                fields: {
                                    guid: "guid/text()",
                                    pubDate: "pubDate/text()",
                                    category: "category/text()",
                                    title: "title/text()",
                                    description: "description/text()",
                                    pubDate: "pubDate/text()",
                                    ip: {
                                        Type: "Type/text()",
                                        TimeDown: "TimeDown/text()",
                                        ETTR: "ETTR/text()",
                                        Progress: "Progress/text()",
                                        AreasAffected: "AreasAffected/text()",
                                        Status: "Status/text()"
                                       } //ip
                                    } //fields
                                 } // model
                             } //schema
                    }); //datasource
                }); //ready
           </script>
</div>

XML Data:

<item xmlns:ip="www.ipact.telkom-ipnet.co.za"><guid isPermaLink="false">NN0008585</guid><pubDate>Fri, 22 Jun 2012 14:31:03 +0200</pubDate><category>Planned Work</category><title>Link - To perform Planned Maintenance on the Telkom Network at Secunda</title><description>&lt;center&gt;&lt;b&gt;Ref:&lt;/b&gt; NN0008585&lt;/center&gt;&lt;b&gt;Category&lt;/b&gt; Planned Work &lt;b&gt;Type:&lt;/b&gt; Planned Work &lt;b&gt;Status:&lt;/b&gt; New&lt;BR&gt;&lt;b&gt;TimeDown:&lt;/b&gt; Thu, 28 Jun 2012 20:00:00 +0200 &lt;b&gt;ETTR:&lt;/b&gt; 8 Hours&lt;BR&gt;&lt;b&gt;Areas affected:&lt;/b&gt; DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX&lt;BR&gt;&lt;b&gt;Progress:&lt;/b&gt; </description><ip:Type>Planned Work</ip:Type><ip:TimeDown>Thu, 28 Jun 2012 20:00:00 +0200</ip:TimeDown><ip:ETTR>8 Hours</ip:ETTR><ip:Progress></ip:Progress><ip:AreasAffected>DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX</ip:AreasAffected><ip:Status>New</ip:Status></item>


Thanks!
Alexander Valchev
Telerik team
 answered on 02 Jul 2012
2 answers
359 views
I'm attempting to add a min and max for an integer style numericTextBox using Razor etc
I can see the values getting set to the correct values using console.debug, but the widget does not respect those limits.
I also tried having an onLoad function to set the min and max but that does the same thing..    
Any ideas on this one ?

<input type="text" id="@(Model.DisplayNumber)" name='answer' value='@answerValue' class="number-only" />

<script type="text/javascript">
    $(document).ready(function () {    
    var numericTextBox = $("#@(Model.DisplayNumber)").kendoNumericTextBox({
      format: "#",
      decimals: 0
    });
    if (@Model.RangeMin != null)
       numericTextBox.min = @Model.RangeMin; 
    if (@Model.RangeMax != null)
       numericTextBox.min = @Model.RangeMax; 
  });

Should have mentioned, this works fine but doesn't check whether the min and max have any values..

$(document).ready(function () {
  $("#@(Model.DisplayNumber)").kendoNumericTextBox(
      {
min: @Model.RangeMin, max: @Model.RangeMax, format: "#", decimals: 0})
});

Ok I'll try a different question. When an object is retrieved back from the Datastore, you cannot change it ?
In other words the "numericTextBox" cannot be altered by .min= etc.. Or, do I have to save it back,  Or I need to set the min and max in a different way. 

Please let me know if I'm wasting more time and this just isn't possible yet, Or if it's coming and when it does it will be done a different way... anyone out there ?






Dimo
Telerik team
 answered on 02 Jul 2012
1 answer
227 views
Is there a way show a pop up dialog with a message with Kendo? I would like to display a message. Thanks for any answers or documention.
Sebastian
Telerik team
 answered on 02 Jul 2012
1 answer
293 views
Hello,

I cannot get patern to work, can get requiredto work  but not patern.
      <li>
            <label for="cities" >
                Zip code:</label>
            <input id="contact_cities" data-bind="value: contact_zip" name="contact_cities" pattern="\d{5}" placeholder="Invalid zip code"
                validationmessage="Invalid zip code." /><span class="k-invalid-msg" data-for="cities"></span></li>
        <li>
.....
 
 
    $(document).ready(function () {
    
        var viewModel = kendo.observable({
            firstName: $.cookie("firstName"),
            lastName: $.cookie("lastName"),
            email: $.cookie("email"),
            phone: $.cookie("phone"),
            contact_zip: $.cookie("zip"),
            valid: false,
            contactseller: function () {
                if (validator.validate()) {
 
                    $.cookie("firstName", $("#firstname").val(), { expires: 7, path: '/' });
                    $.cookie("lastName", $("#lastname").val(), { expires: 7 , path: '/'});
                    $.cookie("email", $("#email").val(), { expires: 7 , path: '/'});
                    $.cookie("phone", $("#phone").val(), { expires: 7 , path: '/'});
                    $.cookie("zip", $("#contact_cities").val(), { expires: 7 , path: '/'});
 
                    status.text("Hooray! Your tickets has been booked!").addClass("valid");
                } else {
                    status.text("Oops! There is invalid data in the form.").addClass("invalid");
                }
            }
        });
 
        kendo.bind($("#contactSeller"), viewModel);
 
        var validator = $("#contactSeller").kendoValidator().data("kendoValidator"), status = $(".status");
 
 
        $("#contact_cities").kendoComboBox({
            placeholder: "Select zip code",
            dataTextField: "Label",
            dataValueField: "Value",
            filter: "contains",
            dataSource: {
                serverFiltering: true,
                transport: {
                    read: {
                        url: '@Url.Action("GetCities", "MainSearch")',
                        data: function () {
                            var combobox = $("#contact_cities").data("kendoComboBox");
                            return {
                                zip: combobox.input.val()
                            };
                        }
                    }
                }
            }
        });
         
        $("img[title]").tooltip();
 
        $('.submit-link').click(function () {
            var input = $(this).attr('id');
            $("#lastId").val(input);
            var window = $("#contactSeller").data("kendoWindow"); window.center(); window.open();
        });
 
        var window = $("#contactSeller").kendoWindow({
            title: "Contact Seller",
            visible: false,
            modal: true,
            resizable: false   
            }).data("kendoWindow");
    });
Rosen
Telerik team
 answered on 02 Jul 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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?