Telerik Forums
UI for ASP.NET MVC Forum
6 answers
368 views
Hi,

what is the status of the localization feature in the july final-release?
In the migrating-from-telerik-extensions-for-asp.net-mvc-FAQs you mentioned:
"The Telerik Extensions for ASP.NET MVC offer the ability for all components to be localized using resource files. As it stands right now, in the beta, Kendo UI for ASP.NET MVC does not contain an equivalent for localization. However, this will change in a future release."

When will localization of the different widgets (espacially for the Grid) be available?
For us that is a dealbreaker in using Kendo UI for ASP.NET MVC instead of the existing Telerik Extensions.

Regards,
Michael.
Michael Sogos
Top achievements
Rank 1
 answered on 30 Jul 2012
1 answer
844 views
I'm using Ajax binding, with the Destroy command.  The controller method fails with a business exception, which I add to the ModelState with the AddMModelError method.  This is then returned at the end of the method with the ModelState.ToDateSourceResult().
In the UI I have the error event of the grid hooked up, which correctly displays the error as expected.  However, the "deleted" row is still removed from the Grid.  Am I doing something wrong?
Burke
Top achievements
Rank 1
 answered on 28 Jul 2012
2 answers
381 views
Hi,

I've tried to implement the client side selection from the original MVC examples http://demos.telerik.com/aspnet-mvc/razor/grid/selectionclientside. I've done this by using the additional data mechanism and everything looks okay until the first refresh after selection. I've verified that the javascript function is called for additional data at the time of the refresh and that the parameter to be passed has the changed value but I'm getting a null in the controller.

I have two grids in my view

Parent

@(Html.Kendo().Grid<OemGridRow>(Model.Oems)
    .Name("OemGrid")
    .Columns(column =>
    {
        column.Bound(p => p.Title);
    })
    .DataSource(dataSource => dataSource
            .Ajax()
            .Events(events => events.Error("error_handler"))
            .Model(model => model.Id(p => p.Id))
            .Read(read => read.Action("GetOems", "Customer"))
    )
    .Pageable()
    .Sortable()
    .Scrollable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
    .Events(events => events.Change("onOemChange"))
)

Child

@(Html.Kendo().Grid<CustomerGridRow>()
    .Name("CustomerGrid")
    .Columns(column =>
    {
        column.Bound(p => p.Title);
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.Id))
        .Read(read => read.Action("GetCustomers", "Customer").Data("getOemId"))
    )
)

Javascript

var OemId;
 
function onOemChange(e) {
    // Get the grids
    var oemGrid = $('#OemGrid').data('kendoGrid');
    var customerGrid = $("#CustomerGrid").data("kendoGrid")
 
    // Set OemId to the selected id of the Oem
    OemId = $.map(this.select(), function (item) {
        var dataItem = oemGrid.dataItem(item);
        return dataItem.Id;
    });
 
    // Read the datasource again
    customerGrid.dataSource.read();
}
 
//
function getOemId() {
    // Return the updated OemId
    return {
        filterId: OemId
    };
}

Controller

public ActionResult GetCustomers([DataSourceRequest]DataSourceRequest request, string filterId)
{
    Guid oemId = filterId.ToGuid();
 
    // Omitted
 
    return Json(customers.ToDataSourceResult(request));
}

Can anybody point me in the direction of where I'm going wrong.

Thanks in advance
Darren
Darren Mann
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
143 views
Hi,

I've got a grid with a custom command that redirects the user to a details page.

@(Html.Kendo().Grid<VehicleGroupGridRow>()
    .Name("VehicleGroupGrid")
    .Columns(column =>
    {
        column.Bound(p => p.Title);
        column.Command(command => {
            command.Edit();
            command.Destroy();
            command.Custom("View").Click("onViewClick");
        });
    })
    .ToolBar(commands => commands.Create())
    .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine))
    .Sortable()
    .DataSource(dataSource => dataSource
            .Ajax()
            .Events(events => events.Error("error_handler"))
            .Model(model => model.Id(p => p.Id))
            .Create(create => create.Action("CreateVehicleGroup", "VehicleGroup"))
            .Read(read => read.Action("GetVehicleGroups", "VehicleGroup"))
            .Update(update => update.Action("UpdateVehicleGroup", "VehicleGroup"))
            .Destroy(destroy => destroy.Action("DestroyVehicleGroup", "VehicleGroup"))
    )
     
)

<script type="text/javascript">
 
    function onViewClick(e) {
        e.preventDefault();
 
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var actionUrl = "@Url.Action("Details", "VehicleGroup", new { Id = "PLACEHOLDER" })";
 
        window.location = actionUrl.replace('PLACEHOLDER',dataItem.Id);
    }
 
</script>

In IE9 when you press the browser back button the "View" button is not visibile, its working for Firefox and Chrome however

Thanks
Atanas Korchev
Telerik team
 answered on 27 Jul 2012
1 answer
608 views
How can i stop the window from opening on page load.
All the examples open the window straight away.
I would like to only open it when the user clicks a button on the page.

here is my code:

<div class="CintTxtBlockWide">
        <span id="openEmail" class="CintSlide"><img src="../../Images/email.jpg" />Keep yours email in the cloud</span>
        <span id="openBox" class="CintSlide"><img src="../../Images/file.jpg" />Your Files in the cloud</span>
        <span id="openDesk" class="CintSlide"><img src="../../Images/desktop.jpg" />Your Desktop in the cloud</span>
        @(Html.Kendo().Window()
            .Name("window")
            .Content(@<text>
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris venenatis, sem sed semper fermentum, leo magna egestas felis, eu dictum nunc nisi eget massa. Nulla diam felis, condimentum sed commodo a, rutrum at metus. Vestibulum consequat volutpat dapibus. Pellentesque vitae sollicitudin nulla. Suspendisse sapien lectus, convallis at vestibulum non, semper sed odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mauris diam, dictum vitae vestibulum non, iaculis id nisi.
                </p>
                <span id="closeWindow">Close</span>
            </text>)
            .Width(420)
            .Height(440)
        )
    </div>
 
<script>
    $(document).ready(function () {
        var desk = $("#window");
 
        $("#openEmail").click(function (e) {
            desk.data("kendoWindow").open();           
        });
        $("#openBox").click(function (e) {
            desk.data("kendoWindow").open();
        });
        $("#openDesk").click(function (e) {
            desk.data("kendoWindow").open();
        });
         
        $("#closeWindow").click(function (e) {
            desk.data("kendoWindow").close();
        });
 
    });
</script>
Andrew
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
156 views
Hi,

I have noticed the following bug.
If you use an input wrapper such as NumericTextBoxFor(), DropdownlistFor() ... , the unobstrusive validation attributes are not rendered when passing in a nested property.

For example, this will work as expected and output the validation attributes ( such as data-required...)
NumericTextBoxFor(model => model.FirstName)

However, the following will not render the validation attributes:
NumericTextBoxFor(model => model.Person.FirstName)

Regards,

Yann
Georgi Krustev
Telerik team
 answered on 27 Jul 2012
1 answer
236 views
I am attempting to edit data in pop-up mode.  The issue is with a numeric field that is being validated to have a value, but the model allows for a nullable decimal.  I am also using the EditorTemplate as provided by Telerik for currency values.

The validator says "The field 'X' must be a number".  How can I allow the grid to allow nullable currency values during edit mode.

As a side note, I have noticed with Web UI Grid that you can set nullable on fields as follows:
schema: {
 model: {
   id: "Id",
   fields: {
      ACurrencyField: { editable: true, nullable: true },
            }
        }
     }


Rosen
Telerik team
 answered on 27 Jul 2012
1 answer
168 views
Can you tell me why my logon page is rendering the textbox incorrectly... url is below:

http://bs.managewithease.com

This is specifically occurring on Mobile devices for Android... it appears to work as expected on iPhone...
Kamen Bundev
Telerik team
 answered on 27 Jul 2012
4 answers
235 views
Guys,

I seem to have boxed myself into a corner and hope someone can help.  

I am working on a new MVC 3 front end to an existing large app, which previously used a Windows Forms front end.  I have made some progress using Syncfusion controls, but find them a bit flaky, so and trying out the MVC wrapper for Kendo.

The app uses a hash-based URL scheme like GMail, so that it loads panels inside the main frame for a smoother and faster experience.  The panels include grids, tabs etc.  using partial views.  The rendering is server side.

My problem is that the Kendo grid  with MVC wrappers (server-bound to iEnumerable lists)  seems to want do a whole page GET to sort a column, which breaks my scheme, since it just loads the page without the main frame.  I thought maybe I could use the Ajax mode, but this wants to serial all of my object properties - which is large and rambling and not something I want to reinvent to fit into a view - in fact it throws a circular reference error, which is quite believable.

Any ideas?  Is my planned doomed?

Mark
Mark
Top achievements
Rank 1
 answered on 26 Jul 2012
1 answer
221 views
Hi, 

I am attempting to create a grid that uses a WCF service as the datasource it is bound to. This has started well... I am able to pass back the data and have incorporated paging & sorting.

I am now looking at incorporating the Grouping and Filtering features, however this is proving problematic.

What I would like to do is pass the 'DataSourceRequest' directly to WCF as it contains all the arguments regarding the sorting, filtering & grouping in it

e.g. 
public ActionResult Index([DataSourceRequest(Prefix = "Grid")] DataSourceRequest request)
        {
            if (request.PageSize == 0)
            {
                request.PageSize = 10;
            }
 
            MvcApplication3.psr.ProductServiceClient psrc = new MvcApplication3.psr.ProductServiceClient();
 
             ResultData results = psrc.KendoGridQuery(DataSourceRequest);
 
            ViewData["total"] = results.Count;
          
             return View(results.Data);
         
        }

I then tried to add the Kendo.MVC library to my WCF project as a reference library so that I would be able to use the DataSourceRequest type.... However when I add the Kendo.MVC.dll as a reference and then compile the project it is unable to import the Kendo namespace.

I assume this is because the wrapper will only work within a MVC project?

Is it possible to add the data types from the MVC wrapper to my WCF project?

Thanks

Chris
Atanas Korchev
Telerik team
 answered on 26 Jul 2012
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?