Telerik Forums
Kendo UI for jQuery Forum
2 answers
172 views
Hi,

I am using mvc kendo ui grid:
                    @(Html.Kendo().Grid<PortalUser>(Model.GetUsers())
                    .Name("Grid")
                    .Columns(columns =>
                    {
                        columns.Bound(p => p.ID).Width(200);                    
                        columns.Bound(p => p.UserName).Width(250);
                        columns.Bound(p => p.Password).Visible(false);
                        columns.Bound(p => p.Email).Width(250);
                        columns.Bound(p => p.Role.Name).Width(200).Title("Role");
                        columns.Bound(p => p.Comment).Width(300);
                        columns.Bound(p => p.IsLockedOut).Title("Locked").Width(100);
                        columns.Command(command => { command.Edit(); }).Width(100);
                        columns.Command(command => { command.Destroy(); }).Width(100);

                    })
                     .ToolBar(toolbar => toolbar.Create())
                     .Editable(editable => editable.Mode(GridEditMode.PopUp))
                    .Pageable()
                    .Sortable()
                    .Scrollable()
                    .Filterable()
                    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
                        .DataSource(dataSource => dataSource
                            .Ajax()
                            .Batch(false)
                            .ServerOperation(false)
                             .PageSize(50)
                             .Create(update => update.Action("Users_Create", "Membership"))
                            .Read(read => read.Action("Users_Read", "Membership").Data("FilterUsers"))
                            .Destroy(update => update.Action("Users_Delete", "Membership"))
                            .Update(update => update.Action("Users_Edit", "Membership"))
                            .Model(model =>
                                {
                                    model.Id(m => m.ID);
                                    model.Field(m => m.ID).DefaultValue(new Guid());
                                    model.Field(m => m.Role).DefaultValue(new PortalRole { RoleID = Guid.NewGuid(), Name = "no role" });
                                })
                        )
                        .HtmlAttributes(new { style = "height:500px" })
                )

I want the Role field to display as dropdown in the popup editor. So i have created a template file called RoleEditor.cshtml in Views\Shared\EditorTemplates.

I have also added the decoration attribute 
        [UIHint("RoleEditor")]
        public PortalRole Role { get; set; }
to the model class
I have followed all the steps given in your documentation:
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/editor-template
and yet it does not work.



Dilip
Top achievements
Rank 1
 answered on 01 May 2013
2 answers
72 views
Hi, 

I am defining some columns for a kendogrid
            sortable: true,
            columnMenu: true,
            resizable: true,
            scrollable: false,
            columns: [
                { field: 'Owner', title: 'Owner' },
                { title: 'W-M', template: '#= WeightCarried # | #= Medication # '},
            ]

Why does the Owner column have a columnMenu, is resizable, and sortable, but the other column cannot do any of these?

Is this a limitation when using a template? Or am I simply missing some additional option?
Jordon
Top achievements
Rank 1
 answered on 01 May 2013
3 answers
120 views
I've had a very difficult time trying to get FX transfer (http://docs.kendoui.com/api/framework/fx/transfer) to simply move a div from one position to another.  It seems like to would be very straightforward.  However, it wasn't.  I tried to work backwards from the transfer demo (http://demos.kendoui.com/web/fx/transfer.html) and finally, after much trial and error, I was able to accomplish it (sort of).  

Please see this jsfiddle .  The trick to get it to work was to make the height/width of #Finish 1px less than #Start. However, I don't want to have to change the height/width.  I just want the div to move (I also discovered that I could get it to work with height/width of 110px if I added a border.  However, I don't want a border).  So, my question is, is this a bug?  Shouldn't I be able to use transfer to move a div without changing the height/width or adding a border?  If there is a way, please let me know.



Petyo
Telerik team
 answered on 01 May 2013
1 answer
206 views
I am having some issues with styling an element inside an li.  I am trying to use a flexbox to render some content horizontally, and when I view it in the simulator in icenium it works great, however on the actual devices (both android and iOS) the rendering is different.  You can see the code in this jsfiddle.  I know that the devices are using the old flexbox syntax, I can make it look right when the content is outside of an li of a listview, but not inside.

On the actual device the flex elements are rendering vertically instead of horizontally, I have attached an image for illustration purposes on how it looks on a real device.

Is there something about the listview that I need to modify to get this to work correctly? Or am I just better off not using  flexbox? (in the example here I have a simple layout without many elements but I am  planning on making it more complex and a flexbox would really be nice for implementing it).


David
Top achievements
Rank 1
 answered on 01 May 2013
1 answer
84 views
What is wrong with this code??

columns.Bound(o => o.Resolved).
ClientTemplate("# if (Resolved == true) { # <input type='checkbox' checked='checked' /> # } #")

This displays nothing in the column. All values are true for Resolved.
Dimo
Telerik team
 answered on 01 May 2013
4 answers
202 views
Hi I'm trying to set my bulletgraph up to use a remote data source however I'm not currently seeing anything on the graph. The JSON output is this:

{"backlogtotalcount":1970}

I get that by running this ajax function in firebug:

$.ajax({
type: 'GET',
url: $('#operationalBacklogGaugeValue').data('url'),
success: function (data) {
$('#operationalBacklogGaugeValue').val(data);
}
});

Finally my bullet graph chart is here:

function operationalEfficiencyChartLoad() {
    setTimeout(function () {
        createOperationalEfficiencyChart();
        $('#operationalEfficiencyChart').bind("kendo:skinChange", function (e) {
            createOperationalEfficiencyChart();
        });
    }, 200);
}

function createOperationalEfficiencyChart() {
    $("#operationalEfficiencyChart").kendoChart({
        legend: {
            visible: false
        },
        dataSource: {
            transport: {
                read: {
                    url: $('#operationalEfficiencyChart').data('url'),
                    dataType: "json"
                }
            }
        },
        series: [{
            type: "bullet",
            currentField: "backlogtotalcount",
            color: '#838281',
            target: {
                line: {
                    width: 0
                 }
            }
        }],
        chartArea: {
            height: 75,
            width: 805,
            margin: {
                left: 0
            }
        },
        categoryAxis: {
            majorGridLines: {
                visible: false
            },
            majorTicks: {
                visible: false
            }
        },
        valueAxis: [{
            plotBands: [{
                from: 0, to: 1960, color: "#8FD400", opacity: .4
            }, {
                from: 1960, to: 2300, color: "#FFD100", opacity: .5
            }, {
                from: 2300, to: 3000, color: "#FF5B35", opacity: .6
            }, {
                from: 1956, to: 1956, color: "#000000", opacity: 1
            }],
            majorGridLines: {
                visible: false
            },
            min: 0,
            max: 3000,
            minorTicks: {
                visible: true
            }
        }],
        tooltip: {
            visible: true,
            format: "#.##"
        }
    });
}

I'm trying to setup a fiddle here http://jsfiddle.net/Alex_Hagerman/bsGTk/16/, so there may be a live demo if that would help but it currently is not co-operating.

If you can tell me what is wrong with this remote data source setup I would really appreciate it.

Alexander
Top achievements
Rank 1
 answered on 01 May 2013
2 answers
90 views
I have the following VM:

var ExportVM = kendo.observable({
    ticketID: "bad",
    maxTiles: 15,
    jobTime: "not yet set",
    timeEstimate: "really bad",
    tileRate: 0,
    tileCount: 0
});
Which I am binding at the top a large DOM, which deep inside has the following two spans that are being data bound:

<div id="ExportBeginBlock">
    <div class="SectionBlock">
        <span>Estimated Time:</span>
        <span data-bind="text: jobTime"></span>
        <span>Hours:Minutes:Seconds</span>
    </div>
    <div class="SectionBlock">
        <span>Estimated Tile Files:</span>
        <span data-bind="text: maxTiles"></span>
    </div>
    <div id="buildMapPackageButton" class="k-button button green bigrounded">BUILD MAP PACKAGE</div>
    <div id="cancelMapButton" class="button rosy bigrounded k-button">CANCEL</div>
</div>
Every once and a while a message comes in from the server and I update the VM:

01.function ShowEstimates(data)
02.{
03.    ExportVM.set("maxTiles", data.maxTiles);
04.    ExportVM.set("ticketID", data.ticket);
05.    ExportVM.set("jobTime", data.timeEstimate);
06.    ExportVM.set("timeEstimate", data.timeEstimate);
07.    ExportVM.set("tileRate", data.tileRate);
08.    kendo.bind($("#ExportBlock"), ExportVM);
09.}

Ok, this works fine, as long as the line #8, iwhich does the rebind is in. But if I move the binding out of the update loop, and do it once at the beginning of the code, then this is not getting rebound! I thought the whole idea of MVVM was that you can just update the VM values. What am I missing.

I have looked in firebug, and I see that the VM is being updated, but I don't see the DOM changing unless I force it.

I am a noobie at MVVM so I assume I am doing something dumb.

Dr.YSG
Top achievements
Rank 2
 answered on 01 May 2013
6 answers
271 views

I have a kendo grid that has a custom editor template for a field.  I want to be able to key the data into the cell as a string (default inline editing) or be able to click a 'loookup/search' icon in the cell, open a popup and make a selection and then populate the data into the cell I am working in.  I have all of it working except I can't seem to figure out how to make the callback that receives the data from the popup locate and update the cell that the popup was initiated from.  Here is a snippet of the code I'm using, what do I do in the callbackHandler?

       var columns = [
            {
                field: "Seq",
                title: "Line",
            },
            {
                field: "Name",
                title: "Name",
            },
            {
                field: "Model",
                title: "Model",
                editor: function (container, options) {
                    var input = $("<input />");
                    input.attr("name", options.field);
                    input.attr("class", "k-textbox");
                    input.appendTo(container);
                    var lookupLink = $("<img src=\"/content/images/search24x24.png\" onclick=\"showModelSearch(callBackHandler);\" />");
                    lookupLink.appendTo(container);
                }
            }
 
        myGrid = $("#myGrid").kendoGrid({
            scrollable: false,
            sortable: true,
            resizable: true,
            reorderable: false,
            dataSource: gridDataSource,
            columns: columns,
            toolbar: ["create"],
            editable: "inline",
        });
 
var callBackHandler = function(selectedData) {
    //Do what???
     //Update the cell that the popup came from with the data sent back
     //but how?
}

 

Dilip
Top achievements
Rank 1
 answered on 01 May 2013
5 answers
196 views
Hi,

I've problem with the latest (v2013.1.319) version of treeView.
When I add node using API it is added correctly ... but when I collapse it I cannot expand it again.
This problem occurs also on your demo site:
http://demos.kendoui.com/web/treeview/api.html
when you press "Append Node" and try the steps that I've just described.
Thanks,

Bart.
Alex Gyoshev
Telerik team
 answered on 01 May 2013
1 answer
208 views
Hi,

I have added controls in kenod panelbar. All controls in panelbar are inside form tag. When i click on submit button, all data is posted back.
But jquery.validate is not working for panelbar. I have initialized validation for controls in panelbar. But when I click submit button, validation is done for controls in panels which are expanded. Validation is not done for fields in panels which are collapsed. I guess, this is because collapsed panel has style as display:none
But is there any way,  jquery validate can work for this scenario?

Thanks in advance.
Petyo
Telerik team
 answered on 01 May 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
Drag and Drop
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?