Telerik Forums
Kendo UI for jQuery Forum
7 answers
341 views
Dear all,

Is it possible to translate your kendo.ui grid, for example this message : 'Drag a column header and drop it here to group by that column' or 'Show items with value that:', etc ...

otherwise is it planned and when ?

Thanks and Regards,
Arnaud Viscusi
emidio rana
Top achievements
Rank 1
 answered on 30 Apr 2013
10 answers
395 views
Hi,
 
I am doing a quick investigation regarding the saving of a controls state. Mainly a Grid control.
 
What i am after is information about a user changing the column order, sort order, hiding/showing columns, etc. And then having these changes saved somewhere (locally most likely) so when they return to the page, these changes persist.
 
Thanks for your help.
 
Simon Gould
Steve
Top achievements
Rank 1
 answered on 30 Apr 2013
3 answers
506 views
Is there a way to show / hide the Loading-Animation by Javascript Code?

And by the way, if I load remote-data by the init-Function of a listview, the loading-Animation does not come up.
Here my code:

function mobileListViewTemplatesInit() {
        $("#termin-listview").kendoMobileListView({
            dataSource: kendo.data.DataSource.create({ transport: { read: { url: urlTermine, dataType: "json",
            data: {
                gn: id
            }} }, group: "Datum" }),
            template: $("#customListViewTemplate").html(),
            headerTemplate: "<h2 class='termin-title'>Termine am ${value}</h2>"
        });
    }


emidio rana
Top achievements
Rank 1
 answered on 30 Apr 2013
0 answers
57 views
Hi,

I have the following requirement to implement.

1. My grid should look like as attached image,
2. it contains two rows
3. from column 2, the no of columns varies  based on the no of weeks in a month (ex: 3 weeks in a month, then 3 column and 6 sub columns )
4. second row data should be fetched from the database using controller and model where my entity class is present
5. first row is empty initially as shown, and also  the first sub-column("input value") of each column should be made editable and based on the value entered, second sub-column and the column 1, should be updated based on the formula shown in screen shot attached
6.column 1 and second sub-column  of each column should be read only
7.  entire second row should be read only

For clear understanding, i am attaching an excel sheet where the first row requirement been achieved.
 

Regards,
Shashi
Shashi
Top achievements
Rank 1
 asked on 30 Apr 2013
3 answers
135 views
Hello,

I've got a fairly simple grid implementation (ASP.NET MVC) which uses the Grid and a dynamically bound data source. When I debug the project, I get the following exception: Any assistance would be greatly appreciated.

Unhandled exception at line 9, column 25731 in
http://localhost:11499/Scripts/kendo/2013.1.319/kendo.all.min.js0x800a03ec -
JavaScript runtime error: Expected ';'


Here's the implementation of the grid in the index.cshtml:

@(Html.Kendo().Grid(Model)<BR> .Name("Grid")<BR> .Columns(columns =><BR>
{<BR>foreach (System.Data.DataColumn column in Model.Columns)<BR> {<BR> if
(column.ColumnName !=
"Id")<BR>columns.Bound(column.ColumnName).Groupable(true);<BR> }<BR> })<BR>
.Pageable()<BR> .Sortable()<BR> .Scrollable()<BR> .Filterable()<BR>
.Groupable()<BR> .ColumnMenu()<BR> .DataSource(dataSource => dataSource<BR>
.Ajax()<BR> .Model(model =><BR> {<BR>foreach (System.Data.DataColumn column
in Model.Columns)<BR> {<BR> if(column.ColumnName !=
"Id")<BR>model.Field(column.ColumnName, column.DataType);<BR> } <BR> })<BR>
.Read(read => read.Action("Read", "Home"))<BR> .PageSize(20)<BR> )<BR>)<BR>
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Apr 2013
2 answers
236 views
I can not get my grid to scroll horizontally at all. I'm using the MVC wrapper and have the following code:

@(
Html.Kendo()
    .Grid<MyModel>
    .Name("grid")
    .DataSource(…)
    .Scrollable()
    .Columns(columns =>
    {
        columns.Bound(…).Width(300);
        columns.Bound(…).Width(200);
        columns.Bound(…).Width(300);
        columns.Bound(…).Width(200);
        columns.Bound(…).Width(200);
        columns.Bound(…).Width(500);
    })
)

This results in a table that squishes the columns to fit the width of the table, instead of triggering a horizontal scroll bar. The grid's content table has a table-layout of "fixed" with a width of 100%. The problem seems to be that inside of the generated tables is a nested colgroup. Instead of:
<table><colgroup><col /><col /></colgroup>...</table>
I see 
<table><colgroup><colgroup><col /><col /></colgroup></colgroup>...</table>
What could be causing this? I'm using the latest version (2013.1.319). What's interesting is that this only appears in how the colgroup is parsed and rendered by the browser. The actual source only has the single colgroup element. Check out the attached screenshot to see what Firebug displays versus the source. There is a difference between what I see in "View Source" and "View Generated Source".

Just a guess, but is the kendoGrid jQuery call adding an additional colgroup? It seems the MVC helper is already building a table with it.


Brian Vallelunga
Top achievements
Rank 1
 answered on 30 Apr 2013
3 answers
185 views
HI,
I am trying to display json data in mobile listview which is returned by asmx webservice. The code for the webservice is:
//Employee class
public class Employee
    {
    public int ID { get; set; }
    public string Name { get; set; }
    public string Company { get; set; }
    public string Address { get; set; }
    public string Phone { get; set; }
    public string Country { get; set; }
}
 [WebService(Namespace = "http://viper.nl")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]   
    [System.Web.Script.Services.ScriptService]
    public class ViperServices : System.Web.Services.WebService
    {
[WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public string TestJSON()
        {
            Employee[] e = new Employee[2];
            e[0] = new Employee();
           
 e[0].ID="1001";
   e[0].Name = "Ajay Singh";
            e[0].Company = "Birlasoft Ltd.";
            e[0].Address = "LosAngeles California";
            e[0].Phone = "1204675";
            e[0].Country = "US";             
            e[1] = new Employee(); 
    e[1].ID="1001";  
            e[1].Name = "Ajay Singh";
            e[1].Company = "Birlasoft Ltd.";
            e[1].Address = "D-195 Sector Noida";
            e[1].Phone = "1204675";
            e[1].Country = "India";
            return new JavaScriptSerializer().Serialize(e);
        }
  
    }

Code how i tried to use the service and display in mobile list view:
 <script type="text/javascript">
         function EmployeeInit() {
             var ds = new kendo.data.DataSource({
                 schema:{
                    data:"d",
                    model:{
                        id:"ID",
                        fields: {
                            ID:{type:"number"},
                            Name:{type:"string"},
                            }
                        },
                 transport: {
                     read: {
                         type: "POST",
                         url: "../Services/ViperServices.asmx/TestJSON",                      
                         ContentType: "application/json",
                         dataType: "json"
                     }
                 }
             });           

         $("#EmployeeList").kendoMobileListView({
            dataSource: ds,
            template: "#:Name#"
        });
        }
        </script>

//initialize list view
<div data-role="view"  data-init="EmployeeInit " >     
           <ul id="EmployeeList">              
            </ul>        
    </div>


I can see the json data if i invoke the service in brower from visual studio environment. But when i try to display in mobile listview, no data is displaying. 

Can anyone tell me what mistake i made or can you provide me a working example on my scenario?

Thanks,
Shree, 
Petur Subev
Telerik team
 answered on 30 Apr 2013
2 answers
113 views
Hello, it is possible to selectively retrieve two different values​​? A name or number? e.g. John Doo = text value and 123 = number value



{
        "CustomerID": "ALFKI",
        "ContactName": "Maria Anders", // selectively 
        "PersonalNumber": "1234", // selectively 
        "CompanyName": "Alfreds Futterkiste"
}


EDIT: I'm looking for a solution if I type a number eg. "12" in 1234 suggested I get when I type "Ma" I inspire get the same user suggested ... It's possible??
$("#customers").kendoMultiSelect({
            dataTextField: "PersonalNumber",
            dataValueField: "CustomerID",
            dataNumberField: "PersonalNumber",
            autoBind:false,
            // define custom template
            itemTemplate: '<img src=\"../content/web/Customers/${data.CustomerID}.jpg\" alt=\"${data.PersonalNumber}\" />' +
                    '<h3>${ data.ContactName }</h3>' +
                    '<p>${ data.CompanyName }</p>'+
                    '<p>${ data.PersonalNumber }</p>',
            tagTemplate: '<img class="tag-image" src=\"../content/web/Customers/${data.CustomerID}.jpg\" alt=\"${data.CustomerID}\" />' +
                    '#: data.ContactName #',
            dataSource: {
                //serverFiltering: true,
                transport: {
                    read: {
                        dataType: "json",
                        url: "customers.json"
                    }
                }
            },
            maxSelectedItems: 5,
 
            height: 300
        });
sven
Top achievements
Rank 1
 answered on 30 Apr 2013
4 answers
360 views
I'm using the MVC wrappers and I have a numeric text box that I'd really like to see without the "," group separator (e.g. 1937 should not be 1,937 as it's shown now). 

Is there anyway to do this in the MVC wrappers?

Thanks.

-Joe
Iliana Dyankova
Telerik team
 answered on 30 Apr 2013
8 answers
312 views
Hello!

I have the following Model

public class Mandant
{
     public Guid Id { get; set; }   
    public string Name { get; set; }
    public DateTime ErzeugtAm { get; set; }
    public DateTime AktualisiertAm { get; set; }
    public string ErzeugtVon { get; set; }
    public string StrasenAdresse { get; set; }
    public string Postfach { get; set; }
    public string Plz { get; set; }
    public string Stadt { get; set; }
    public string Staat { get; set; }
}

A Grid is constructed to list and edit the Mandant Model

<%=html.Kendo().Grid<MandantEntity>()
.Name("Mandanten")
.ToolBar(toolbar => toolbar.Create())
.Pageable(pageable => pageable.ButtonCount(5))
.Sortable(sortable => sortable.AllowUnsort(true).SortMode(GridSortMode.SingleColumn))
.Filterable()
.Editable(editable => editable.Mode(
GridEditMode.InLine))
.DataSource(dataSource => dataSource.Ajax()
.PageSize(5)
.Read(read => read.Action(
"Read", "Mandant"))
.Update(update => update.Action("Update", "Mandant"))
.Create(create => create.Action("Create", "Mandant"))
.Model(model => 
    {
        model.Id(p => p.Id); 
        model.Field(field => field.Id).DefaultValue(Guid.NewGuid()); 
        model.Field(field => field.ErzeugtAm).DefaultValue(DateTime.MinValue);
        model.Field(field => field.AktualisiertAm).DefaultValue(DateTime.MinValue);
        model.Field(field => field.ErzeugtVon).DefaultValue(Guid.NewGuid());
        model.Field(field => field.AktualisiertVon).DefaultValue(Guid.NewGuid());
    }))    
.Columns(columns =>
{
    columns.Bound(o => o.Name).Width(180);
    columns.Bound(o => o.StrassenAdresse).Width(180);
    columns.Bound(o => o.Postfach).Width(50);
    columns.Bound(o => o.Plz).Width(60);
    columns.Bound(o => o.Stadt).Width(60);
    columns.Bound(o => o.Staat).Width(60);
    columns.Command(command => command.Edit()).Width(200);
})
    %>

As above, the code works great.  I can load the view, edit existing elements, and create new ones.

When I change the Mode to GridEditMode.PopUp, I can no longer load the view. I get instead the following error. 
I would really appreciate your help on this!



 

The model item passed into the dictionary is of type 'System.Guid', but this dictionary requires a model item of type 'System.String'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The model item passed into the dictionary is of type 'System.Guid', but this dictionary requires a model item of type 'System.String'.
Source Error:

Line 7:  
Line 8:  <asp:Content ID="indexFeatured" ContentPlaceHolderID="FeaturedContent" runat="server">
Line 9:      <%= Html.Kendo().Grid<MandantEntity>()
Line 10:     .Name("Mandanten")
Line 11:     .ToolBar(toolbar => toolbar.Create())   // zeigt den Button für New oben    

Source File: c:\Abakus\trunk\src\AbaScore\AbaScore\Views\Mandant\Index.aspx    Line: 9
Stack Trace:

[InvalidOperationException: The model item passed into the dictionary is of type 'System.Guid', but this dictionary requires a model item of type 'System.String'.]
   System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) +584415
   System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) +371
   System.Web.Mvc.ViewUserControl`1.SetViewData(ViewDataDictionary viewData) +48
   System.Web.Mvc.WebFormView.RenderViewUserControl(ViewContext context, ViewUserControl control) +63
   System.Web.Mvc.WebFormView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +78
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   Castle.Proxies.Invocations.IView_Render.InvokeMethodOnTarget() +118
   Castle.DynamicProxy.AbstractInvocation.Proceed() +80
   Glimpse.Core.Extensibility.CastleInvocationToAlternateMethodContextAdapter.Proceed() +11
   Glimpse.Core.Extensibility.ExecutionTimer.Time(Action action) +76
   Glimpse.Core.Extensions.AlternateMethodContextExtensions.TryProceedWithTimer(IAlternateMethodContext context, TimerResult& timerResult) +135
   Glimpse.Core.Extensibility.AlternateMethod.NewImplementation(IAlternateMethodContext context) +25
   Glimpse.Core.Extensibility.AlternateTypeToCastleInterceptorAdapter.Intercept(IInvocation invocation) +84
   Castle.DynamicProxy.AbstractInvocation.Proceed() +108
   Castle.Proxies.IViewProxy.Render(ViewContext viewContext, TextWriter writer) +214
   System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +579
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1002
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +66
   System.Web.Mvc.Html.DefaultEditorTemplates.ObjectTemplate(HtmlHelper html, TemplateHelperDelegate templateHelper) +554
   System.Web.Mvc.Html.DefaultEditorTemplates.ObjectTemplate(HtmlHelper html) +48
   System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +709
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1002
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +66
   System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper html, Object additionalViewData) +51
   Kendo.Mvc.UI.Html.GridHtmlHelper`1.EditorForModel(Object dataItem, String templateName, IEnumerable`1 foreignKeyData, Object additionalViewData) +161
   Kendo.Mvc.UI.Grid`1.InitializeEditors() +747
   Kendo.Mvc.UI.Grid`1.WriteHtml(HtmlTextWriter writer) +474
   Kendo.Mvc.UI.WidgetBase.ToHtmlString() +81
   Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString() +22
   Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToString() +5
   System.Web.HttpWriter.Write(Object obj) +24
   System.Web.Mvc.SwitchWriter.Write(Object value) +13
   System.Web.UI.HtmlTextWriter.Write(Object value) +31
   ASP.views_mandant_index_aspx.__RenderindexFeatured(HtmlTextWriter __w, Control parameterContainer) in c:\Abakus\trunk\src\AbaScore\AbaScore\Views\Mandant\Index.aspx:9
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Abakus\trunk\src\AbaScore\AbaScore\Views\Shared\Site.Master:36
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +268
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +41
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
Vladimir Iliev
Telerik team
 answered on 30 Apr 2013
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?