Telerik Forums
Kendo UI for jQuery Forum
1 answer
202 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
190 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
117 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
1 answer
79 views
Hi, I have a grid with a link in the Action column. In each row is a triangle. I also have a "Link" in the Action column. I wish when I press the link was made as shares of the triangle. How can I do that? Sorry for my english.:P
Kamil
Top achievements
Rank 1
 answered on 17 Apr 2012
1 answer
308 views
Hi.

I'm testing kendoUI but i want to change the theme for android. I'm using ThemBuilder. I copy the CSS and add it to my page. But does not work. Why?

Documentation:
Using the CSS output

Just copy the CSS output to a .css file and include it in your page.

This is my simple code.

<!DOCTYPE html>
<html>
<head>
    <title>Basic usage</title>
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.mobile.min.js"></script>
    <script src="content/shared/js/console.js"></script>
 
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />
    <link href="styles/silver.css" rel="stylesheet" />
</head>
<body>
    <a href="index.html">Volver</a>
    <div data-role="view" id="tabstrip-profile" data-title="Mi Estado de Cuenta" data-layout="mobile-tabstrip" data-transition="slide" >
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            <ul>
                <li><h2>Grupo SAESA<span>Sucursal</span></h2><img src="content/mobile/overview/logo.jpg" /></li>
                <li>Weekly average sales <span class="sales-up">$ 8,250</span></li>
                <li>Monthly average sales <span class="sales-up">$ 32,000</span></li>
            </ul>
        </li>

        <li>
            Languages
            <ul>
                <li>English <span class="value">Native</span></li>
                <li>Hungarian <span class="value">Advanced</span></li>
                <li>French <span class="value">Advanced</span></li>
                <li>Chinese <span class="value">Beginner</span></li>
            </ul>
        </li>
 
    </ul>
</div>
 
<div data-role="view" id="tabstrip-cortes" data-title="Cortes Programados" data-layout="mobile-tabstrip" data-transition="slide">
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            SAESA
            <ul>
                <li class="item-title">Lunes 16 de Abril del 2012 Comuna de Valdivia<span class="item-info">Condominio Silos de Torobayo</span><span class="item-hora">10:00 a 16:00</span></li>
                <li class="item-title">Lunes 16 de Abril del 2012 Comuna de Valdivia<span class="item-info">Condominio Silos de Torobayo</span><span class="item-hora">10:00 a 16:00</span></li>
                <li class="item-title">Lunes 16 de Abril del 2012 Comuna de Valdivia<span class="item-info">Condominio Silos de Torobayo</span><span class="item-hora">10:00 a 16:00</span></li>
                <li class="item-title">Lunes 16 de Abril del 2012 Comuna de Valdivia<span class="item-info">Condominio Silos de Torobayo</span><span class="item-hora">10:00 a 16:00</span></li>
                 
                
            </ul>
             
        </li>
         
    </ul>
</div>
 
<div data-role="view" id="tabstrip-rating" data-title="Rating" data-layout="mobile-tabstrip" data-transition="slide">
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            Sales Representatives
            <ul>
                <li data-icon="toprated">1. Andrew Fuller</li>
                <li data-icon="toprated">2. Janet Leverling</li>
                <li data-icon="toprated" style="background-color: #3589e7; color: #fff;">3. Carine Callahan</li>
                <li data-icon="toprated">4. Margaret Johnson</li>
                <li data-icon="toprated">5. Steve Collins</li>
                <li data-icon="toprated">6. Maria Steward</li>
            </ul>
        </li>
    </ul>
</div>
 
<div data-role="view" id="tabstrip-settings" data-title="Settings" data-layout="mobile-tabstrip" data-transition="slide">
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            Carine Callahan
            <ul>
                <li>Notify when online <input type="checkbox" data-role="switch" checked></li>
                <li>Administrator <input type="checkbox" data-role="switch"></li>
                <li>Access to stats <input type="checkbox" data-role="switch" checked></li>
            </ul>
        </li>
    </ul>
</div>
 
<div data-role="layout" data-id="mobile-tabstrip">
    <header data-role="header">
        <div data-role="navbar">
            <!--<a class="nav-button" data-align="left" data-role="backbutton">Back</a>-->
            <span data-role="view-title"></span>
            <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
        </div>
    </header>
 
    <p>TabStrip</p>
 
    <div data-role="footer">
        <div data-role="tabstrip">
            <a href="#tabstrip-profile" data-icon="organize" >Mi Cuenta</a>
            <a href="#tabstrip-cortes" data-icon="recents">Cortes</a>
            <a href="#tabstrip-rating" data-icon="stop">Emergencia</a>
            <a href="#tabstrip-settings" data-icon="settings">Opciones</a>
        </div>
    </div>
</div>
 
 
    <script>
     new kendo.mobile.Application($(document.body), {
         platform: "android"
     });
</script>
</body>
</html>

Please help me


Alex Gyoshev
Telerik team
 answered on 17 Apr 2012
0 answers
150 views
please help me
i want dropdown selected value

<select data-role="dropdownlist" data-text-field="name" data-value-field="value1"
        data-bind="events: { change: dropDownChangeEvent },source: data,value:selectValue">
    </select>


in observable
dropDownChangeEvent: function (e){
 var value = (this).get('selectValue');
                    alert(value);
}


 it will give me previous value not current selected  value
Rahul
Top achievements
Rank 1
 asked on 17 Apr 2012
2 answers
77 views
With a batch edit grid, I wanted to write a method that would warn the user if they try to do a page/sort/filter operation when they have data that hasn't been saved.  I figure I can look for any cases where .k-dirty-cell shows up and if any are found I can launch a confirm dialog that asks "Save changes before continuing?" or something like that.  But what I can't figure out is what event on the grid or datasource I would need to hook into for this logic.  Ideally, I'd want to have it fire before the read() operation is called on the datasource since that would catch pretty much any situation where the data might get overwritten.  Any suggestions on how/if this can be done?

Thanks!

Regards,
Brian
Brian Roth
Top achievements
Rank 1
 answered 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)
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?