Telerik Forums
UI for ASP.NET MVC Forum
1 answer
662 views
I'm using the UI for MVC MaskedTextBoxFor construct with phone numbers.  

For basic areacode+number, it's working fine.   But I don't see anything in the documentation about how to add an additional optional extension number to the end - for a maximum form of "(000) 000-0000 x09999".   In your documentation I saw no predefined mask rules for optional parts of the mask.

I see that I can do the validation part of this with a regex rule but don't see how to get the mask to automatically insert the " x" after the end of the "3333" part of the number in preparation of an option 1 to 5 number extension if and only if the user continues typing characters after typing the primary number "(000) 000-0000" part.

I'm assuming that this should be able to be be done via a custom mask rule function, but didn't see any examples in your documentation involving optional pieces of content where fixed content like the " x" will be auto-added for the user.

Thanks!
-Bob
Georgi Krustev
Telerik team
 answered on 16 Jun 2014
3 answers
369 views
I've been using the Grid successfully to implement paging, sorting, filtering via server-side POSTs, it all works great. However, I am having trouble getting the DELETE buttons (and possibly UPDATE as well) to immediately post, it seems like the control is waiting/batching them up... and I don't want that behavior. I want immediate POSTs for delete and update.

Can anyone see where I'm going wrong here?

Thanks,
Craig


<script type="text/javascript">
    $(function () {
        $("#employeesGrid").kendoGrid({
            toolbar: ["create", "save", "cancel"],
            columns: [
                { field: "FirstName", title: "First Name" },
                { field: "LastName", title: "Last Name" },
                { command: "destroy" }
            ],
            dataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "api/Customer",
                        type: "POST",
                        contentType: "application/json"
                    },
                    destroy: {
                        url: "api/Customer/Delete",
                        type: "POST"
                        //contentType: "application/json"
                    },
                    parameterMap: function (options, operation) {
                        if (operation === "read")
                            return kendo.stringify(options);
                        else
                            return options;
                    }
                },
                schema: { data: "Data", total: "Count", model: { id: "Id"} },
                pageSize: 5,
                serverPaging: true,
                serverSorting: true,
                error: function (e) {
                    console.log(e.statusText);
                }
            }),
            batch: false,
            editable: {
                //mode: "popup",
                destroy: true
            },
            scrollable: false,
            sortable: true,
            pageable: true
        });
    });
</script>
Petur Subev
Telerik team
 answered on 16 Jun 2014
1 answer
103 views
I would like to display following chart in logarithmic way 

@(Html.Kendo().Chart()
    .Name("chart3")
    .Title("Time Based graph")
         .SeriesDefaults(seriesDefaults => seriesDefaults.Line().Style(ChartLineStyle.Smooth).Markers(false)
          )
           .Series(series =>
           {
               series
                   .Line(new double[] {102, 100, 98, 103, 105, 99, 98, 104, 102, 104, 100, 94, 104, 109, 142, 198, 512, 405, 709, 805, 1203, 845, 1000, 1025, 1002, 1120, 1205, 1508});
           }
           )
           .CategoryAxis(axis => axis
              .Categories(new DateTime[]
              {
                  new DateTime(2011,01,01), new DateTime(2011,01,02), new DateTime(2011,01,03), new DateTime(2011,01,04), new DateTime(2011,01,05), new DateTime(2011,01,06),
                  new DateTime(2011,01,07), new DateTime(2011,01,08), new DateTime(2011,01,09), new DateTime(2011,01,10), new DateTime(2011,01,11),
                  new DateTime(2011,01,12),
                  new DateTime(2011,01,13), new DateTime(2011,01,14), new DateTime(2011,01,15), new DateTime(2011,01,16), new DateTime(2011,01,17), new DateTime(2011,01,18),
                  new DateTime(2011,01,19), new DateTime(2011,01,20), new DateTime(2011,01,21), new DateTime(2011,01,22), new DateTime(2011,01,23),
                  new DateTime(2011,01,24), new DateTime(2011,01,25), new DateTime(2011,01,26), new DateTime(2011,01,27), new DateTime(2011,01,28)
              }
           )
           )
           
           )
I tries to add that option in VAlueAxis Proporties like that but it changed nothing 

@(Html.Kendo().Chart()
    .Name("chart3")
    .Title("Time Based graph")
         .SeriesDefaults(seriesDefaults => seriesDefaults.Line().Style(ChartLineStyle.Smooth).Markers(false)
          )
           .Series(series =>
           {
               series
                   .Line(new double[] { 102, 100, 98, 103, 105, 99, 98, 104, 102, 104, 100, 94, 104, 109, 142, 198, 512, 405, 709, 805, 1203, 845, 1000, 1025, 1002, 1120, 1205, 1508 });
           }
           )
           .CategoryAxis(axis => axis
              .Categories(new DateTime[]
              {
                  new DateTime(2011,01,01), new DateTime(2011,01,02), new DateTime(2011,01,03), new DateTime(2011,01,04), new DateTime(2011,01,05), new DateTime(2011,01,06),
                  new DateTime(2011,01,07), new DateTime(2011,01,08), new DateTime(2011,01,09), new DateTime(2011,01,10), new DateTime(2011,01,11),
                  new DateTime(2011,01,12),
                  new DateTime(2011,01,13), new DateTime(2011,01,14), new DateTime(2011,01,15), new DateTime(2011,01,16), new DateTime(2011,01,17), new DateTime(2011,01,18),
                  new DateTime(2011,01,19), new DateTime(2011,01,20), new DateTime(2011,01,21), new DateTime(2011,01,22), new DateTime(2011,01,23),
                  new DateTime(2011,01,24), new DateTime(2011,01,25), new DateTime(2011,01,26), new DateTime(2011,01,27), new DateTime(2011,01,28)
              }
           )
           )
           .ValueAxis(a => a.Logarithmic())
)


Could you help me please?
T. Tsonev
Telerik team
 answered on 16 Jun 2014
1 answer
68 views
i use app.navigate('#test') when i input transition to view ,will open view 2 times
if i not put transition no problem but run event onshow 2 times
Kiril Nikolov
Telerik team
 answered on 13 Jun 2014
3 answers
325 views
Hello,

I need some help, please.

I have a mobile drawer, but I want to change the way the button looks depending on if the drawer is showing or not.
Any ideas on how to do this? I am not sure which style property to use for this.

Thanks
Kiril Nikolov
Telerik team
 answered on 12 Jun 2014
3 answers
951 views
I am trying to use ListView using MVC 

 @{Html.Kendo()
           .ListView(Model)
           .Name("cutomers")
           .BindTo(Model);
  }

Where do we specify templates? I do see there's a ClientTemplateId property exposed but not able to find its usage.
Can you please share any sample showing ListView in MVC.

Thanks,
Kuljit
Daniel
Telerik team
 answered on 12 Jun 2014
7 answers
220 views
I'm trying to use the new html5 report viewer using the example given here HTML5 Report Viewer with MVC .

Whenever i try to call the controller class from the example , i get this error:

The IControllerFactory 'CNX.WebUI.Infrastructure.NinjectControllerFactory' did not return a controller for the name 'MenuReport'.

Does Telerik have any tutorials on how to use this new report viewer in conjunction with Ninject?


Stef
Telerik team
 answered on 12 Jun 2014
6 answers
869 views
Hi,

I'm developping an ASP.NET MVC application using Kendo UI v2014.1.415.  Some of the Kendo controls are not rendering properly in Release mode. I check the the css bundle I found the following :
/* Minification failed. Returning unminified contents.
(27,35175): run-time error CSS1030: Expected identifier, found '.'
(27,35182): run-time error CSS1031: Expected selector, found ')'
(27,35182): run-time error CSS1025: Expected comma or open brace, found ')'
*/

Here is the code from my bundle config :

 bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));

            //Kendo UI - Begin
            const string VersionKendo = "2014.1.415";
            const string KendoScriptFolder = "~/Scripts/kendo/" + VersionKendo + "/";
            const string KendoCssFolder = "~/Content/kendo/" + VersionKendo + "/";

            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                KendoScriptFolder + "kendo.all.min.js",
                KendoScriptFolder + "cultures/kendo.culture.en-US.min.js",
                KendoScriptFolder + "cultures/kendo.culture.fr-FR.min.js",
                KendoScriptFolder + "kendo.aspnetmvc.min.js"
                ));

             bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
                KendoCssFolder + "kendo.common.min.css", 
                KendoCssFolder + "kendo.metro.min.css",
                KendoCssFolder + "kendo.default.mobile.min.css"));
            
            // Clear all items from the default ignore list to allow minified CSS and JavaScript files to be included in debug mode
            bundles.IgnoreList.Clear();

            // Add back the default ignore list rules sans the ones which affect minified files and debug mode
            bundles.IgnoreList.Ignore("*.intellisense.js");
            bundles.IgnoreList.Ignore("*-vsdoc.js");
            bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
            //Kendo UI - End          

            BundleTable.EnableOptimizations = true;

How can I fix this?




Sebastian
Telerik team
 answered on 12 Jun 2014
2 answers
198 views
Hi Guys,

I am using the Combobox and it is giving me a javascript error. I have made sure JQuery is only included once and other Kendo controls are working.

Razor Code
@(Html.Kendo().ComboBox()
                            .Name("Projects")
                            .DataTextField("ProjectName")
                            .DataValueField("ProjectID")
                            .HtmlAttributes(new { style = "width:200px" })
                            .Filter("contains")
                            .AutoBind(false)
                            .MinLength(3)
                            .DataSource(source =>
                            {
                                source.Read(read => { read.Action("GetProject", "VMS"); }).ServerFiltering(true);
                            })) 

Controller Code
public JsonResult GetProject([DataSourceRequest] DataSourceRequest request)
        {
            var model = _db.Project.ToList();
            var result = model.ToDataSourceResult(request, r => new
            {
                ProjectID = r.ID,
                ProjectName = r.Name,
            });
            return Json(result, JsonRequestBehavior.AllowGet);
        }

JSON from fiddler
{"Data":[{"ProjectID":1,"ProjectName":"Project 1"},{"ProjectID":2,"ProjectName":"Project 2"},{"ProjectID":3,"ProjectName":"Project 3"}],"Total":3,"AggregateResults":null,"Errors":null}

Chrome error
Uncaught TypeError: undefined is not a function kendo.all.min.js:11
ct.extend.success kendo.all.min.js:11
b.isFunction.i jquery-1.9.1.js:7223
n.success kendo.all.min.js:11
c jquery-1.9.1.js:7341
p.fireWith jquery-1.9.1.js:7403
k jquery-1.9.1.js:9597
r

Thanks
Andrew





Andrew
Top achievements
Rank 1
 answered on 11 Jun 2014
5 answers
446 views
Hi,

I am using "resizable:true" in Kendo Grid, but only filterable columns can be re-sized. Non-filterable (with "filterable:false") columns can't be re-sized. I have searched it on Kendo forums, but apparently no solution.

Regards
Zaheer
Dimo
Telerik team
 answered on 11 Jun 2014
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
ColorPicker
DateRangePicker
Security
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?