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

Is there a way to use the mobile icons/images outside of a button (or with a tab strip, or listview etc.), so for example to display the search icon alone in a div using something like:

<div data-role="icon" data-icon="search"></div>

I'm trying to use the search icon, next to a search input tag for searches in my prototype.

Thanks,
Rob
Robert
Top achievements
Rank 1
 asked on 18 Apr 2012
9 answers
463 views
Dear Community,

We are evaluating KendoUI for our needs and here is one of the problem we have stuck on.

Problem Statement

We are trying to achieve almost similar to what is shown in demo http://demos.kendoui.com/web/grid/editing-custom.html.

Here is what we are doing.

We have a data source to fill the combo-box which will appear within the grid. It is basically a list of cities.
var cityDataSource = [{ CityID: 1, CityName: 'Delhi' }, { CityID: 2, CityName: 'Noida'}]

We also have main data source which contains lot more columns. Here you will observe that we have CityID as one of the fields.
var viewModel = kendo.observable({
            gridSource: [
                            { FirstName: "Shiva", LastName: "Wahi", CityID: 2, Title: "Module Lead", BirthDate: "10/29/1984", Age: 27 },
                            { FirstName: "Priya", LastName: "Srivastava", CityID: 1, Title: "Tech Lead", BirthDate: "08/19/1982", Age: 30 }
                        ]
        });

In document.Ready function, we are preparing our data source (Please note CityName in fields section).
$(document).ready(function () {
            var dataSource = new kendo.data.DataSource({
                pageSize: 30,
                data: viewModel.gridSource,
                autoSync: true,
                schema: {
                    model: {
                        fields: {
                            FirstName: { type: "string" },
                            LastName: { type: "string" },
                            CityName: "CityName",
                            Title: { type: "string" },
                            BirthDate: { type: "date" },
                            Age: { type: "number" }
                        }
                    }
                }
            });

There is a div tag on page called grid.
<div id="grid" />

Creating grid (Please note editor:cityDropDownEditor):
$("#grid").kendoGrid({
                dataSource: dataSource,
                pageable: true,
                editable: true,
                height: 260,
                toolbar: ["create"],
                columns: [
                            {
                                field: "FirstName",
                                title: "First Name",
                                width: 100
                            },
                            {
                                field: "LastName",
                                title: "Last Name",
                                width: 100
                            },
                            {
                                field: "CityName",
                                title: "City",
                                width: 100,
                                editor: cityDropDownEditor
                            },
                            {
                                field: "Title",
                                width: 75
                            },
                            {
                                field: "BirthDate",
                                title: "Birth Date",
                                width: 75,
                                template: '#= kendo.toString(BirthDate,"MM/dd/yyyy") #'
                            },
                            {
                                field: "Age",
                                width: 50
                            }
                         ]
            });
        });

Here is the cityDropDownEditor function:
function cityDropDownEditor(container, options) {
           $('<input data-text-field="CityName" data-value-field="CityName" data-bind="value:' + options.field + '"/>')
                       .appendTo(container)
                       .kendoDropDownList({
                           autoBind: false,
                           dataSource: cityDataSource
                       });
                   }


What do we want?

We want that when we click on the City column of the grid, dropdown should open up and when user changes the selection, it must reflect on the UI and as well as on my observable collection called viewModel.

But this is not happening at present. Our scenario is bit different from what is available in demo as there they are using CategoryName to bind both value and text fields of combo-box.

Please help as this is an urgent request and let me know if you need more details around this.

Regards,
Shiva




Shiva
Top achievements
Rank 1
 answered on 18 Apr 2012
3 answers
196 views
I read describe about transition on your document about page transition. I want to transition some page only content (header not transition and no footer) from top to bottom, I used data-transition="overlay:down" but when is action looks same slide down. 

Do you have example for explain how to different with 2 transitions?
Petyo
Telerik team
 answered on 18 Apr 2012
0 answers
147 views
I am a new KendoUI/Jquery/Javascript developer and I am having the following issue. 
The ajax call is working ($.ajax(GetAirportList)), so I know the webservice is ok.
When the airportListDataSource is invoked, no data is loaded and the Javascript console (in Chrome) is 
giving me the message "Uncaught RangeError: Maximum call stack size exceeded"

Please help!
 
var airportList = {};

        var GetAirportList = {
            type: "POST",
            url: "OWLV2be.asmx/GetAirportList",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                airportList = msg;
            }
        };

        var airportListDataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    type: "POST",
                    url: "OWLV2be.asmx/GetAirportList",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json"
                }
            }
        });

        $(document).ready(function () {
            $.ajax(GetAirportList);

            $("#airpAirport").kendoDropDownList( {
                dataTextField: "airportName",
                dataValueField: "airportCode",
                dataSource:  airportListDataSource
            });
George
Top achievements
Rank 1
 asked on 18 Apr 2012
1 answer
199 views
Dear team, I´m very interested in acquiring kendoui and I have some doubts regarding its already developed potential. I was wondering if its possible to create a listview with data filtering options in the way pages like http://www.ebay.com/sch/9355/i.html works. I mean if you select brand, or price slider the information change on the fly...
brgds! thank you
s.
Sebastian
Top achievements
Rank 1
 answered on 18 Apr 2012
1 answer
118 views
i have a WCF service and i configure it on jsonp

My Model is MoviesItem

    [DataContract]
    public class MoviesItem
    {
        [DataMember]
        public int MovieID { get; set; }
        [DataMember]
        public string MovieTitle { get; set; }
        [DataMember]
        public DateTime MovieReleseDate { get; set; }
    }


my Service Contract is IMovieService

    [ServiceContract]
    public interface IMoviesService
    {
        [WebGet( BodyStyle = WebMessageBodyStyle.Bare ,RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        IEnumerable<MoviesItem> GetMovies();
    
        [WebInvoke(Method = "POST",BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        void AddMovies(MoviesItem movies);
    
    }


and my service is called MoviesService

    [AspNetCompatibilityRequirements(RequirementsMode =
        AspNetCompatibilityRequirementsMode.Allowed)]
    public class MoviesService : IMoviesService
    {
    
        public IEnumerable<MoviesItem> GetMovies()
        {
            using (var context = new MovieCollectionDataContext())
            {
                return context.Movies.Select(e => new MoviesItem()
                {
                    MovieID = e.ID,
                    MovieTitle = e.Title,
                    MovieReleseDate = e.ReleaseDate
    
                }).Take(100).ToList();
            }
        }
    
    
        public void AddMovies(MoviesItem movies)
        {
            using (var context = new MovieCollectionDataContext())
            {
    
                var movie = new Movie()
                {
                    Title = movies.MovieTitle,
                    ReleaseDate = DateTime.Now
                };
                context.Movies.InsertOnSubmit(movie);
                context.SubmitChanges();
    
                //return context.Movies.Select(e => new MoviesItem()
                //{
                //    MovieID = e.ID,
                //    MovieTitle = e.Title,
                //    MovieReleseDate = e.ReleaseDate
    
                //}).Take(100).ToList();
    
            }
        }
    }


My Web.config file is:

    <?xml version="1.0"?>
    <configuration>
      <connectionStrings>
        <add name="moviereviewsConnectionString" connectionString="Data Source=Haseeb-PC;Initial Catalog=moviereviews;Integrated Security=True"
          providerName="System.Data.SqlClient" />
      </connectionStrings>
      <system.web>
        <compilation debug="false" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>
        </compilation>
      </system.web>
      <system.serviceModel>
        <bindings>
          <webHttpBinding>
            <binding name="WebHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true"/>
          </webHttpBinding>
        </bindings>
        <behaviors>
          <endpointBehaviors>
            <behavior name="webHttpBehavior">
              <webHttp helpEnabled="true"/>
            </behavior>
          </endpointBehaviors>
          <serviceBehaviors>
            <behavior>
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
        <services>
          <service  name="MoviesService">
            <endpoint address="" behaviorConfiguration="webHttpBehavior"
                      binding="webHttpBinding" bindingConfiguration="WebHttpBindingWithJsonP" contract="IMoviesService"/>
          </service>
        </services>
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
    </configuration>


nad at last My javascript code code which is used to bind Kendo Grid

    $(function () {
        BindGridWithKendoDataSource();
    });

    function BindGridWithKendoDataSource() {
        var dataSource1 = new kendo.data.DataSource(
            {
                transport:
                    {
                        read:
                            {
                                url: "MoviesService.svc/GetMovies",
                                dataType: "jsonp",
                                //contentType:"application/javascript",
                                type: "GET"
    
    
                            },
                        create:
                            {
                                url: "MoviesService.svc/AddMovies",
                                dataType: "jsonp",
                                contentType: "application/javascript",
                                type: "POST"
                            }
                    },
                parameterMap: function (data, operation) {
                    if (operation !== "read") {
                        return JSON.stringify({ movies: data.models });
                    }
                },
                batch: true,
                pageSize: 10,
                schema:
                    {
                        //data: "d",
                        model:
                            {
                                id: "MovieID",
                                fields:
                                    {
                                        MovieID: { editable: false, nullable: true },
                                        MovieTitle: { validation: { required: true} }
                                        // MovieReleaseDate: {type:"date", editable: true, validation: { required: true} }
                                    }
                            }
                    }
            });
        $("#MoviesGridView").kendoGrid(
            {
                dataSource: dataSource1,
                pageable: true,
                sortable: true,
                filterable: true,
                scrollable: true,
                height: 400,
                toolbar: ["create", "save", "cancel"],
                editable: "popup",
                columns:
                   [
                       { field: "MovieTitle", title: "Movie Title" },
                //{ field: "MovieReleaseDate", title: "Release Date" },
                       {command: ["edit", "destroy"], title: "&nbsp;", width: "210px" }
                       ]
    
            });
    }



my kendo grid is successfully bind from the data return from WCF  in jsonp format but when i click try to innsert the record in the database using Kendo grid i always get error that is:

    "NetworkError: 400 Bad Request - http://localhost:2382/KendoUiTest/MoviesService.svc/AddMovies?callback=jQuery17102623996303075524_1334611809600"


please some one help me to solve this issue that how can i insert the record using WCF. where i am doing wrong i am not able to understand.

Haseeb
Top achievements
Rank 1
 answered on 17 Apr 2012
3 answers
188 views
How can I make a X axis like this 

          |
          |
          |
          |
_____|______________________________________________________________________________________________
Month 1 2 3 4 5 6 7 8 9 10 11 12  1 2 3 4 5 6 7 8 9 10 11 12  1 2 3 4 5 6 7 8 9 10 11 12  1 2 3 4 5 6 7 8 9 10 11 12 
Year               2009                                    2010                                   2011                                      2012

This means a double line axis one for month and other for year

Thanks

John K
Monique
Top achievements
Rank 1
 answered on 17 Apr 2012
0 answers
109 views
When I set my datasource's address to a faulty location that results in a 404 error the "error" event of my datasource isn't fired. I've tried putting a catch everywhere I can think of but the error is thrown from jQuery and doesn't bubble up.

Am I doing something wrong?
Ryan
Top achievements
Rank 1
 asked on 17 Apr 2012
0 answers
115 views
Where's a sample that uses a pager on remote data.  Like I see you have a products demo (the main one)...but you have 76 records returned.  How do I configure it so that I can have the pager set the take and skip values so I'm only getting the items on demand?

$(document).ready(function () {
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: $medportal.Url.Host + "/Sitefinity/Services/Medportal/Community/ForumService.svc/forum/2445",
                contentType: "application/json; charset=utf-8",
                type: "GET",
                dataType: "json",
                data: {
                    take: 3,
                    skip: 0
                }
            }
        },
        schema: {
            data: "Items",
            total: "TotalCount"
        }
    });
 
    $(".telligent-listview-pager").kendoPager({
        dataSource: dataSource
    });
 
    var template = "<li>${Subject}</li>";
 
    $(".telligent-listview").kendoListView({
        pageSize: 3,
        dataSource: dataSource,
        template: kendo.template(template)
    });
 
 
});
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 17 Apr 2012
0 answers
30 views
I see that some KendoUI team members routinely embed jsFiddles in their replies.

Are we allowed to do so, and if so, how to do it ?

Thanks
Luc
Top achievements
Rank 1
 asked on 17 Apr 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)
SPA
Filter
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
OrgChart
TextBox
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?