Telerik Forums
Kendo UI for jQuery Forum
5 answers
1.2K+ views
Hello,
I have a page with many controls on the page. On a click of button a window opens in a modal form. But there is a scrollbar on the page. On scrolling , the modal kendo window  moves below the page. I want it in center with the movement of scrollbar. Here is the code i am using.

$(

"#openButton").click(function () {  

var window1 = $("#window").kendoWindow({ 
content: "Test.html"
title: " Window Content"
modal: true });  

var window = $("#window").data("kendoWindow"); 
window.center();
window.open(); });

Thanks in advance.

Dave
Top achievements
Rank 1
 answered on 16 Nov 2012
1 answer
134 views
Hi

I have written following code inside the View.

Razor View:
<div id="wrapper">
            <div class="SettingArea">
                @foreach (ModuleLinkViewModel moduleQuickLink in ViewBag.ModuleLinks as List<ModuleLinkViewModel>)
                {
                    <script type="text/x-kendo-tmpl" id="template">
                        <dl>
                             <div id="mainareaforsettingicons">
                                <div id="trans_bg">
                                    <div id="white_bg">
                                        <div id="settingicon">
                                            <dd><a href="@(Url.Content("~/" + (moduleQuickLink.Link)))" target="_self">
                                    <img src="@(Url.Content("~/Content/themes/default/images/Settings/") + (moduleQuickLink.Icon))"  alt="@(moduleQuickLink.ToolTip)" border="0"/></a></dd>
                                        </div>
                                    </div>
                                </div>
                                <div id="reflaction">
                                    <dt><label>@(moduleQuickLink.Title)</label></dt>
                                </div>
                            </div>
                        </dl>                        
                    </script>                 
                }
                <div id="Configuration"></div>
                @{(Html.Kendo().ListView<ModuleLinkViewModel>()
                    .Name("Configuration")
                    .TagName("div")
                    .Pageable()
                    .ClientTemplateId("template")
                    .DataSource(dataSource => dataSource
                        .Read(read => read.Action("Read", "Configuration"))
                        .PageSize(20)
                        )
                ).Render();}
            </div>
            <div id="footer_line_grey">
            </div>
            <div id="footer_line_white">
            </div>
        </div>

Controller :
 public ActionResult Index()
        {
            IEnumerable<ModuleLinkViewModel> moduleLinks = this.GetAllConfigSettings(string.Empty);
            ViewBag.ModuleLinks = moduleLinks;

            return this.View();
        }

        [OutputCache(Duration = 0, VaryByParam = "None")]
        public ActionResult Read([DataSourceRequest]DataSourceRequest request, string searchSettingKeyword)
        {
            IEnumerable<ModuleLinkViewModel> moduleLinks = this.GetAllConfigSettings(searchSettingKeyword);
            ViewBag.ModuleLinks = moduleLinks;


            return this.Json(moduleLinks.ToList().ToDataSourceResult(request));
        }

Now the problem is that when I do run the solution I could not able to see the ListView appearing on the page. But as and when I am seeing it's View Source I do able to see that all the necessary rows are appearing inside.

Can anyone please guide where am I doing mistake?

Sapan
sapan
Top achievements
Rank 1
 answered on 16 Nov 2012
5 answers
286 views
Hello,

Based on your sample (http://jsbin.com/oxuvom/3/edit) I tried what happens if I have 2 rows of data and one of them has a missing value. In this case the values next to the missing one are shifted to a wrong place: http://jsbin.com/oxuvom/29/edit

Please let me know if I missed something.

Thanks,
Andras


Andras
Top achievements
Rank 1
 answered on 16 Nov 2012
2 answers
314 views
Dear support

Having a grid with multiple columns that is configured to single column sorting mode, I discovered that as soon as the grid is sorted by one column, the other columns get completely unordered.

Please see the attached image for an example

What I want to achieve is that even if the user actively sorts by one column (through clicking on the header), the other columns still have some meaningful (e.g. ascending) order.

So my question is:

Is it possible to tell a grid with single sort and client-side sorting to sort the other columns, too?

Thanks
Uwe

(Update: The original image was misleading, I added a better one)
Uwe
Top achievements
Rank 1
 answered on 16 Nov 2012
5 answers
730 views
Hi,
I have the following code which is far as I can tell as per the documentation and examples but the listview always appears empty.
My View is as follows
@model iProjX.Models.RolesModel
@using iProjX.Models;
 
<script type="text/x-kendo-tmpl" id="rolesList">
    <h3> ${Id} ${Description}</h3>
</script>
 
<div id="listView"></div>
<div class="k-pager-wrap">
    <div id="pager"></div>
</div>
 
 
<script type="text/javascript">
    var projectId = @(Html.Raw(Model.ProjectId));
 
    var sharedDataSource = new kendo.data.DataSource({
        transport: {
                read: {
                    url: "http://localhost:1278/Project/getRoles",
                    type: "POST"
                }
        },
        change: function (data) {
            debugger;
            alert("success ");
        },
        error: function (xhr, error) {
            debugger;
            alert("error ");
        },
        pageSize: 3
    });
 
    //Configure the List
    $("#listView").kendoListView({
        pageable: true,
        selectable: true,
        navigatable: true,
        template: kendo.template($("#rolesList").html()),
        dataSource: sharedDataSource
    });
 
    //Configure the Pager
    $("#pager").kendoPager({
        dataSource: sharedDataSource
    });
      
</script>

 

And my controller contains

public JsonResult getRoles([DataSourceRequest] DataSourceRequest request)
{
    var projectId = 113;
    using (LocationRepositry _locationRepository = new LocationRepositry())
    {
        IEnumerable<myLocation> Locations = _locationRepository.getByProjectId_Simple(projectId).Select(p =>     new     myLocation()
        {
            Id = p.Id,
            Description = p.Description
        }).ToList();
        return Json(Locations.ToDataSourceResult(request));
     }
}

And myLocation is

public class myLocation
{
    public myLocation() {}
 
    public Int64 Id { get; set; }
    public String Description { get; set; }
}

Now, with this implementation my controller function getRoles is hit and I can see the data returned from the server via browser tools as below.

Data returned from server
{"Data":[{"Id":132,"Description":"Location 1"},{"Id":133,"Description":"Location 2"},{"Id":134,"Description":"Location 3"},{"Id":135,"Description":"Location 4"}],"Total":4,"AggregateResults":null,"Errors":null}

The change function on the datasource is then subsequently hit but the data parameter returned contains an empty set of Data items as below (taken from visual studio immediate window).

?data
{...}
    items: []
    sender: {...}
    preventDefault: function(){g=!0}
    isDefaultPrevented: function(){return g}



If I change my controller to return without using the ToDataSourceResult extension it actually will work.
    return Json(Locations);

However, is this then the correct implementation or have I done something else wrong? And would this have an effect on how paging works?

Any help would be much appreciated.
Thanks

 

 

 

sapan
Top achievements
Rank 1
 answered on 16 Nov 2012
0 answers
164 views
evaluating kendo ui

on OSX with Safari 4

using free download files dated 10 July 12 viz. kendoui/examples/web/dropdownlist/index.html

if you duplicate the 4 no. cap size options twice to give 12 options the scrollbar is displayed but locked.

similar lock happens for combobox / autocomplete / timepicker with when scrollbar added

can this be fixed ?

1.
if you show the display:none list with $("#dropdownlist-list").show() the scrollbar is working

2.
possible workaround is to replace scrollbar

$("#dropdownlist-list").css({width:100}).jScrollPane(); which does not display scrollbar

$("#dropdownlist-list").mouseenter(function(){

$(this).css({width:100}).jScrollPane();

}).mouseleave(function(){

$(this).hide();
});
Michael
Top achievements
Rank 1
 asked on 16 Nov 2012
1 answer
269 views
Just noticed a small bug in validating a checkbox. 

To replicate in demo:
1. tab to checkbox
2. click checkbox with mouse

Result: A checked box with error message (as if it wasn't checked).
Rosen
Telerik team
 answered on 16 Nov 2012
0 answers
135 views
Hi,
Can i create a DropDown Menu how KendoUI Menu Products ??

Vitantonio
Top achievements
Rank 1
 asked on 16 Nov 2012
0 answers
122 views
Hi,

I'm currently populating a label with the values entered into a numerictextbox, i can get the numeric values fine, but i would like to retrieve it together with the formatting as well. eg. numerictextbox showing $1,234.00 should be retrieved as displayed into a label. Thanks.
Justin
Top achievements
Rank 1
 asked on 16 Nov 2012
1 answer
107 views
Hi,

I tried the Kendo Grid (2012.2.710) with the following example for MVC 4. However, the command button Add New Record does not work (not effect when mouse over, click nothing happens) for Firefox, but it works for Chrome. But if it is plain html , it works fine for both.

I am not sure what could be problem? Appreciate if someone can help.

Thanks

 <div id="example" class="k-content">
            <div id="grid"></div>


            <script>
                $(document).ready(function () {
                    var crudServiceBaseUrl = "http://demos.kendoui.com/service",
                        dataSource = new kendo.data.DataSource({
                            transport: {
                                read: {
                                    url: crudServiceBaseUrl + "/Products",
                                    dataType: "jsonp"
                                },
                                update: {
                                    url: crudServiceBaseUrl + "/Products/Update",
                                    dataType: "jsonp"
                                },
                                destroy: {
                                    url: crudServiceBaseUrl + "/Products/Destroy",
                                    dataType: "jsonp"
                                },
                                create: {
                                    url: crudServiceBaseUrl + "/Products/Create",
                                    dataType: "jsonp"
                                },
                                parameterMap: function (options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return { models: kendo.stringify(options.models) };
                                    }
                                }
                            },
                            batch: true,
                            pageSize: 30,
                            schema: {
                                model: {
                                    id: "ProductID",
                                    fields: {
                                        ProductID: { editable: false, nullable: true },
                                        ProductName: { validation: { required: true } },
                                        UnitPrice: { type: "number", validation: { required: true, min: 1 } },
                                        Discontinued: { type: "boolean" },
                                        UnitsInStock: { type: "number", validation: { min: 0, required: true } }
                                    }
                                }
                            }
                        });


                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            "ProductName",
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px" }],
                        editable: "inline"
                    });
                });
            </script>
        </div>


tritue
Top achievements
Rank 1
 answered on 16 Nov 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?