Telerik Forums
UI for ASP.NET MVC Forum
1 answer
166 views

I am using the Kendo Sortable widget with my grid. My grid is using in-cell editing and when I am finished editing a cell and click into another editable cell the input I just entered disappears from the previous cell. It only does this when I am using the Sortable widget, if I turn the Sortable off the grid in-cell editing works normal. 

 

I am using the Sortable as it is shown in this demo: http://demos.telerik.com/kendo-ui/sortable/integration-grid

 

The only difference is that the grid in the demo isn't an editable grid, so is that what could be causing the issue?

Stefan
Telerik team
 answered on 08 Dec 2017
6 answers
2.5K+ views

Hi,

 I've have to use Kendo Grid in several languages but in the same decimal and dates format (fr-FR). I managed to change Kendo language.

 I also add the script and add the routine to change kendo culture.

 

<head>
...
    <script src="~/Scripts/Kendo/cultures/kendo.culture.fr-FR.min.js"></script>
    <script>
        kendo.culture('fr-FR');
    </script>
</head>

I also add in web.config;

<system.web>
    <globalization culture="fr-FR" />
 </system.web>

If I put a breakpoint and examine kendo variable, i have kendo.cultures.current = 'fr-FR'. The culture file is correctly included in page sources.

 Yet, the display format remains incorrect and when I edit a grid inline, I also have problems with validation.

 Am I missing something?

Stefan
Telerik team
 answered on 08 Dec 2017
4 answers
287 views

I have a kendoGrid initialized in cshtml. It uses ajax binding.

The grid model looks like { int id, int typeId, string name, string value }.
The grid has 2 columns Name and Value and Value is editable InCell. For now grid works well with using by default usual textbox as editor. I have to improve the grid to have possibility of using different controls in the "value" field depending of the value of "typeId". I tried to use custom EditorTemplate for that but I cannot find a way to pass typeId to the template (the column is bound to "value"). Is it possible to pass there an extra parameter from the grid model or reach it out from the template somehow?

Regards, Alexey

Here is the link to the same post on Stackoverflow:

https://stackoverflow.com/questions/47577527/using-different-controls-in-a-editable-column

Ravish
Top achievements
Rank 1
 answered on 07 Dec 2017
1 answer
316 views
Is it possible to use id and parentId to build the diagram instead of using a list of children objects in each node?
Stefan
Telerik team
 answered on 07 Dec 2017
1 answer
433 views

Hi,

I try to use the kendo mvc upload control.

I linked to this demo:

http://demos.telerik.com/aspnet-mvc/upload/async

In some computers it works fine, but on another (tested on chrome + IE) the control works as expected but the progress bar not working.

The progress bar become full at the beginning and the percentages are not shown.

The computer settings:

Windows server 2012 R2, 64 bit.

Chrome version: 62.0.3202.94 (Official Build) (64-bit)

IE version: Internet Explorer 11 version: 11.0.9600.18639.

 

Thank you for help,

Elad.

 

 

 

 

 

 

Ianko
Telerik team
 answered on 06 Dec 2017
4 answers
166 views

Hi,

I am trying to apply the functionality from Resize and Expand Grid

https://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/resize-grid-when-the-window-is-resized

to the TreeList.

I have tried tree.Scrollable(true); as an equivalent for grid.Scrollable(scrollable => scrollable.Height("auto")); but it does not work. At least the classes on content are not the same.

Can this be achieved? How can I have resize and Expand TreeList to 100% Height?

Dan
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 06 Dec 2017
1 answer
135 views

Hello,

I'm trying to use serverFiltering with Razor, but when I step through my code I can see that Filtering is always Null. Here's my code - can someone see what the issue may be?

@(Html.Kendo().Grid<DAL.ViewModels.Lists.AccountList>()
            .Name("kendogridvpc")
            .Columns(columns =>
            {
            columns.Bound(c => c.FirstName).Width(175);
            columns.Bound(c => c.LastName).Width(175);
            columns.Bound(c => c.Email);
            columns.Bound(c => c.Role).ClientTemplate("<i class='fa fa-shield' aria-hidden='true' title='PF: #: PFN #'></i> #: Role #").MinScreenWidth(480);
            columns.Bound(c => c.Id).Hidden();
            columns.Bound(c => c.LatestHPFormId).Hidden();
            columns.Bound(c => c.RoleId).Hidden();
            columns.Bound(c => c.isClosed).Hidden();
            columns.Bound(c => c.IsLockedOut).Hidden();
            columns.Bound(c => c.IsApproved).Hidden();
            columns.Bound(c => c.IsLatestHPFormOnline).Hidden();
            columns.Template(@<text>Hello</text>)
                    .Title("Status")
                    .MinScreenWidth(480)
                    .Width(120)
                    .ClientTemplate("# if (IsApproved) { #<span class='user-approved'><i class='fa fa-check-circle-o' aria-hidden='true' title='Account Approved'></i></span> # } else { # <span class='user-unapproved'><i class='fa fa-check-circle-o' aria-hidden='true' title='Account Not Approved'></i></span> #}# # if (HPFormHasIssues) {#<span class='user-highlight' title='Highlighted Issues'><i class='fa fa-exclamation-triangle' aria-hidden='true'></i></span>#}# # if (isClosed) {# <span class='user-highlight' title='Account Closed'><i class='fa fa-archive' aria-hidden='true'></i></span> #} else {# #if (IsLockedOut) {#<span class='user-highlight' title='Account Suspended'><i class='fa fa-lock' aria-hidden='true'></i></span> #}# #}#");
                columns.Command(command => command.Custom("Actions").HtmlAttributes(new { @class = "btn-primary" }).Click("showMenu")).Width(110);
            }
        )
        .Pageable()
        .Sortable()
        .Filterable(ftb => ftb.Mode(GridFilterMode.Menu)
            .Operators(ops => ops.ForString(str => str.Clear()
                .StartsWith("Starts with")
                .IsEqualTo("Is equal to")
                .IsNotEqualTo("Is not equal to")
                .Contains("Contains")
                .DoesNotContain("Does not contain")
        )).Enabled(true))
        .DataSource(dataSource => dataSource
            .Custom()
            .Type("aspnetmvc-ajax")
            .PageSize(10)
            .ServerPaging(true)
            .ServerSorting(true)
            .ServerFiltering(true)
            .Filter(filters => {
                filters.Add<string>(f => f.FirstName).IsNotNull();
            })
            .Schema(schema =>
            {
                schema.Data("Data");
                schema.Total("Total");
                schema.Model(model =>
                {
                    model.Id("Id");
                    model.Field("FirstName", typeof(string));
                    model.Field("LastName", typeof(string));
                    model.Field("Email", typeof(string));
                    model.Field("Role", typeof(string));
                    model.Field("RoleId", typeof(Guid));
                    model.Field("isClosed", typeof(bool));
                    model.Field("IsLockedOut", typeof(bool));
                    model.Field("IsApproved", typeof(bool));
                });
            })
            .Transport(transport =>
            {
                transport.Read(read => read.Action("Users_Read", "User").Type(HttpVerbs.Get));
                transport.ParameterMap("parameterMap");
            })
)
)
Stefan
Telerik team
 answered on 06 Dec 2017
1 answer
370 views

 

I'm trying to put a listbox in a popup editor for a grid. However, whenever I do I get an error. It works fine in forms, base indexes, etc.

Here is an example of the listbox I'm creating. It's very simple and impossible for it to have any object issues/etc. This thing literally should have zero problems.

@(Html.Kendo().ListBox()
            .Name("optional")
            .Toolbar(toolbar =>
            {
                toolbar.Position(Kendo.Mvc.UI.Fluent.ListBoxToolbarPosition.Right);
                toolbar.Tools(tools => tools
                    .TransferTo()
                    .TransferFrom()
                    .TransferAllTo()
                    .TransferAllFrom()
                    .Remove()
                );
            })
            .ConnectWith("selected")
            .BindTo(new List<string>() { "Test", "Test 2" })
)

@(Html.Kendo().ListBox()
            .Name("selected")
            .BindTo(new List<string>())
            .Selectable(ListBoxSelectable.Multiple)
)

However, when it's placed inside a template in the EditorTemplates folder I get this javascript error:

kendo.all.js:9244 Uncaught TypeError: e.value is not a function
    at init.refresh (kendo.all.js:9244)
    at init.bind (kendo.all.js:8485)
    at r.applyBinding (kendo.all.js:9486)
    at r.bind (kendo.all.js:9436)
    at s (kendo.all.js:9579)
    at s (kendo.all.js:9588)
    at s (kendo.all.js:9588)
    at s (kendo.all.js:9588)
    at Object.a [as bind] (kendo.all.js:9603)
    at init.refresh (kendo.all.js:42964)

I have absolutely no idea why. Can anyone explain to my why this happens or more importantly - how to get a listbox inside the editor popup for a grid?

Stefan
Telerik team
 answered on 05 Dec 2017
3 answers
355 views

Hello,

how can I set an initial value if the control has serverfiltering is true?

http://demos.telerik.com/aspnet-mvc/combobox/serverfiltering

To be clearer we have a multipage wizard where you can navigate between his pages. On the first page we have some comboboxes with a large datasoure (200k~ items). So we set the combobox to filter on server which works well. We got the entered text and fire a contains query against the database. If the user now submits the form with the combobox in it, we store the key value (15) in die session. After a while the user decides to choose an other value from that combobox and opens the page of it. Now we want to show the previous selected value in that combobox, but how? We have first tried to set its value via javascript .value(15) but that shows the 15 in the combobox but not the text (Tofu). How can we force to select the data from the server if it is not loaded? With .text("Tofu") it shows the tofu but has no key value :( thats maybe because we have multiple items with name Tofu but with diffrent ids.

Thank you!
Ivan Danchev
Telerik team
 answered on 01 Dec 2017
1 answer
709 views
My Issue is that once I had upgraded to version 2017.3.913,  pre-populating the multiselect did not work.

The Ajax does return data, and throws no error when setting the value.

I have also tried a default random value to see if I could get a dummy pre selected value and nothing.

Is there another way to set value with text and id into the multiselect field.

Thank You.

Example of code below.

<table style="width:100%; margin:0px; padding:0px;">
                <tr>
                    <td style="margin:0px; padding:0px;position:relative;">
                        @(Html.Kendo().MultiSelect().Name("VesselMultiDropDown")
                            .DataTextField("Text").DataValueField("Value")
                            .Filter("contains")
                            .IgnoreCase(true)
                            .DataSource(source =>
                            {
                                source.Read(read =>
                                {
                                    read.Action("JsonGetJobVisitExporWithBarcodeStatusOnlytMultiDropDown", "DropDown").Data("getEnvironment");
                                })
                                .ServerFiltering(true);
                            })
                            .AutoClose(false)
                            .AutoBind(false)
                            
                                    .HtmlAttributes(new { style = "width:100%-22px;margin-right:22px;" })
                            .Placeholder("Select vessel...")
                        )
 
                    </td>
                </tr>
            </table>

 

jQuery(window).load(function () {
 
       $.ajax({
           url: "@Url.Action("GetSessionVessels", "Barcode")",
           type: 'POST',
           traditional: true,
           success: function (dataVessels) {
 
               $("#VesselMultiDropDown").data("kendoMultiSelect").value(dataVessels);
                
           }
       });
   });
Neli
Telerik team
 answered on 01 Dec 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?