Telerik Forums
Kendo UI for jQuery Forum
1 answer
305 views

   
THIS GRID IS LOCATED IN A PARTIAL-
@(Html.Kendo()
      .Grid<USARAFSyncMVC.Areas.Event.Models.PaxModel>(Model.EventPaxBreakDowns)
      .Name("PaxGrid")
      .DataSource(dataSource => dataSource
                                          .Ajax()


                                          .Model(model => model.Id(p => p.PaxBDID))
                                          .Create(update => update.Action("_InsertPax", "Event", new { Area = "Event" }))
                                          .Update(update => update.Action("_SavePax", "Event", new { Area = "Event" }))
                                          .Destroy(update => update.Action("_DeletePax", "Event", new { Area = "Event" })))
      .Columns(columns =>
      {
          columns.Bound(p => p.CountryTitle);
          columns.Bound(p => p.MilitaryPlanned);
          columns.Bound(p => p.MilitaryActual);
          columns.Bound(p => p.CivilianPlanned);
          columns.Bound(p => p.CivilianActual);
          columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200).Title("Actions");
      })

      .Pageable()
      .Scrollable()
      .ToolBar(toolbar => toolbar.Create())
      .Sortable()
)

IT IS THEN LOADING DYNAMICALLY INTO THIS WINDOW-

 $("#windowcontainer").append("<div id='window'></div>");


    var mywindow = $("#window").kendoWindow({
        title: title,
        content: { url: url },
        visible: false,
        draggable: false,
        modal: true,
        animation: false,
        onclose: onclose,
        onopen:onOpen, 
        deactivate: function () {
            this.destroy();
        }
    }).data("kendoWindow");
    mywindow.center();
    mywindow.open();


It centers then the grid throws it off and it seems to anchor to the right of the screen. When I try to drag it, it expands, and it's right side stays anchored to the right side of the browser. When I resize, then I am able to drag it. 

But I do not want any of that to happen, I would like it to just center in the first place. 

BTW: It works fine without a grid!


Thanks





Dimo
Telerik team
 answered on 22 Aug 2012
0 answers
163 views
Hello I have an issue with intial sected index of tab strip

I tried:

$("#mobilePeriodChooser").kendoMobileTabStrip({
            selectedIndex: 2
        });

but this causing some duplications and still first is active.

I also tried:
$("#mobilePeriodChooser").data("kendoMobileTabStrip").selectedIndex = 2
But this one is showing error becuase data("kendoMobileTabStrip") is undefined.

So how to setup it ?

Marcin
Top achievements
Rank 1
Veteran
 asked on 22 Aug 2012
1 answer
107 views
Can I assign XML data to kendo DataSource without configuring the field of the object, like one we do with JSON data?
Alexander Valchev
Telerik team
 answered on 22 Aug 2012
1 answer
116 views
I have following code according to spec:

<a  href="#chartView?period=7" >This Year</a>
        <a  href="#chartView?period=8" >Last Year</a>
and
<div data-role="view" id="chartView" data-title="@ViewBag.Title" data-layout="databinding" data-show="initChart">

However wen I click on button I have error in console and nothing happens:

Error: Syntax error, unrecognized expression: #chartView?period=8
throw new Error( "Syntax error, unrecognized expression: " + msg );
jquery-1.8.0.js (wiersz 4512)

I'm not able to make my aplication working with spec.

It looks there were breaking changes in jquery 1.8.0, everything is working in 1.7.1, so please could you look?
Petyo
Telerik team
 answered on 22 Aug 2012
6 answers
5.9K+ views
I've just downloaded a KendoUI from your web-site, and I can see everything but binaries folder where, if I understand correctly, should be a Kendo.Mvc.dll. I can see /examples, /styles, /js, /source and /LicenseAgreement, but no /binaries.
So which download actually has a dll which is expected to be referenced from a project instead of Telerik.Mvc.dll?
pawan
Top achievements
Rank 1
 answered on 22 Aug 2012
3 answers
1.9K+ views
Hi:
I was getting the following:
Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)

Source Error:
Line 3: }
Line 4: <h2>TabStrip2</h2>
Line 5: @(Html.Kendo().TabStrip()
Line 6: .Name("tabstrip")
Line 7: .Items(tabstrip =>

Solution: Added
<configSections>
  <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
  </sectionGroup>
</configSections>
and:
<system.web.webPages.razor>
  <pages pageBaseType="System.Web.Mvc.WebViewPage">
    <namespaces>
      <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Kendo.Mvc.UI" />
    </namespaces>
  </pages>
</system.web.webPages.razor>
To my web config file.
Phil
Kushal
Top achievements
Rank 1
 answered on 22 Aug 2012
5 answers
402 views
Hi 

Im trying to put the upload component inside window.
After the select file window is opened and i select a file, i see it twice in the list. if i uncheck the multiple option then i see it uploaded twice to the server but in the list i see only one file.

i have the latest jquery and kendoui libraries.

  @(Html.Kendo().Window()
           .Name("window")
           .Title("Upload images")
           .Content(@<text>
                         @(Html.Kendo().Upload().Multiple(false)
                                     .Name("files")
                                     .Async(a => a
                                                     .Save("Save", "Properties")
                                                             .Remove("Remove", "Properties")
                                                     .AutoUpload(true)
                                     )
                               )
                     </text>)
           .Draggable()
           .Modal(false).Visible(true))
Drew
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
265 views

When i click on grid i get this error

Syntax error, unrecognized expression: tr:not(.k-grouping-row) > td:not(.k-hierarchy-cell,.k-detail-cell,.k-group-cell,.k-edit-cell,:has(a.k-grid-delete)) 

 

jquery-1.8.0.js, line 4512 character 2

The grid loads with data, paging and sorting works dispite the error, but I can not batch edit, double clicking on cell does not bring up editing.

Any ideas?

Thanks

my grid

$(document).ready(function () {
            dataSource = new kendo.data.DataSource({
                transport: {
                    read:  {
                        url: "/franchisees/stock/EmailKendo",
                        dataType: "json"
                    },
                    update: {
                        url: "/franchisees/stock/Update",
                        dataType: "jsonp"
                    },
                    destroy: {
                        url: "/franchisees/stock/Destroy",
                        dataType: "jsonp"
                    },
                    create: {
                        url: "/franchisees/stock/Create",
                        dataType: "jsonp"
                    },
                    parameterMap: function(options, operation) {
                        if (operation !== "read" && options.models) {
                            return {models: kendo.stringify(options.models)};
                        }
                    }
                },
                batch: true,
                pageSize: 25,
                schema: {
                    model: {
                        id: "ProductID",
                        fields: {
                            ProductId: { editable: false, nullable: false },
                            Name: { validation: { required: true } },
                            Level: { type: "number", validation: { required: true } },
                            MinQuantity: { type: "number" },
                            OrderByThe: { type: "number" },
                            Order: { type: "number", editable: true }
                }
                    }
                }
            });
 
        $("#grid").kendoGrid({
            dataSource: dataSource,
            navigatable: true,
            sortable: true,
            pageable: true,
            toolbar: ["create", "save", "cancel"],
            columns: [
                "Name",
                { field: "Level",  width: 150 },
                { field: "MinQuantity", width: 100 },
                { field: "OrderByThe", width: 100 },
                { field: "Order", width: 100 }],
            editable: true
        });
    });

Alan Mosley
Top achievements
Rank 1
 answered on 22 Aug 2012
0 answers
67 views
Hi, I writing beacouse i have problem with sort column. My column content date on format: 17-08-2012/22:03. When i sort this column i get sort example:
13-08-2012/22:03
13-07-2012/22:03
17-06-2012/22:03
17-06-2012/22:03
21-08-2012/22:03

Or
21-08-2012/22:03
17-06-2012/22:03
17-06-2012/22:03
13-08-2012/22:03
13-07-2012/22:03

I try add to column format: "{0:dd-MMMM-yyyy/h:s}" but this is not working.

        field: "data",
        title: "<?php echo $translate->_("Date");?>",
        sortable: true,
        filterable: false,
        width: 120,
        format: "{0:dd-MMMM-yyyy/h:s}"


Please help me:/

Ps. sorry for my poor english.
Jacek
Top achievements
Rank 1
 asked on 22 Aug 2012
3 answers
195 views
Hi guys,

I'm trying to change my tabstrip gradient color and it's not working. How do I change it?

This is what I currently have:

#custTab .km-tabstrip {background-color:#ccc;}

All that does is change the top half of the tabstrip
Martin
Top achievements
Rank 1
 answered on 22 Aug 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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?