Telerik Forums
UI for ASP.NET MVC Forum
5 answers
438 views
Hi Guys!  I am new Asp.net MVC and KendoUI.... can you help me on how populate the grid dynamically? or for example if have to pick in a combobox, it will display the data according to the selected item???

Thank you very much! God bless
Gopi
Top achievements
Rank 1
 answered on 15 Oct 2012
0 answers
77 views
TreeView is not expanding on mobile devices (well, at least on iOS and Android):
ver 2012.2.913
styles and scripts in order:
kendo.common.min.css
kendo.default.min.css"
kendo.mobile.all.min.css

jquery-1.7.1.min.js
kendo.all.min.js
kendo.aspnetmvc.min.js

not expanding example:
         @(Html.Kendo().TreeView()
                .Name("sometree")
                .Items(treeview =>
                {
                    treeview.Add()
                        .Expanded(false)
                        .Selected(true)
                        .Items(items =>
                        {
                            items.Add().Text("S");
                            items.Add().Text("S");
                            items.Add().Text("S");
                        });
                })
                )
Simon
Top achievements
Rank 1
 asked on 15 Oct 2012
1 answer
790 views
Hi

Is there any way I can loop through the rows for a particular page or at least the page visible to the user.
What am I doing right now is iterating through all the rows in the datasource as below

var grid = $("#MyKendoGrid").data("kendoGrid");
var data = grid.dataSource.data();
$.each(data, function (i, row) {
        //do something
 });

But what if I want to iterate on the rows of a particular page.
I can get the current page by grid.dataSource.page(); Then what's next?

Please advise.
Nikolay Rusev
Telerik team
 answered on 15 Oct 2012
0 answers
111 views
Hi,

I have a "Create" form in my MVC application that has some fields like firstName, lastName...  and a Kendo grid.  The grid has two columns (namve/value pairs).

I can't create the values in the grid until I create the rest of the form.  I need to post all of the data on the form back at the same time.

Is there a way to post the grid data along with the rest of the form data?


Dave
Top achievements
Rank 1
 asked on 14 Oct 2012
0 answers
152 views
Hello,
I'm uploading a CSV file and try to parse it.
I want to return to the client a responsive message what is the issue (as I found it).

I've tried this:
Response.StatusCode = (int)System.Net.HttpStatusCode.BadRequest;
Response.ContentEncoding = Encoding.UTF8;
            Response.ContentType = "application/json; charset=utf-8";
            

return Json(myResponse, Response.ContentType, Response.ContentEncoding);

Where myResponse is of a specific type containing my status code. I'm checking the value of my Status Code (called Rc) and act accordingly. 

I'm changing the StatusCode, because the retry button appears and the user can try uploading again easily).
It work fine in Chrome and FF, but not in IE (all in my dev server)
I've change the behavior to be like this:

// for IE responseText
if (Request.Browser.IsBrowser("IE"))
{
     Response.StatusCode = (int)System.Net.HttpStatusCode.OK;
     Response.ContentType = "text/html; charset=utf-8";
}
// End of

and that solve the issue for IE.

BUT:
When moved to testing environment, the myResponse is holding the 'BadRequest' string and not my Json response, and then I don't have any info to display to the client.

So - I've removed the line 
Response.StatusCode = (int)System.Net.HttpStatusCode.BadRequest;

and my js handler look like that
function onUploadSuccess(e) {
            //alert("Success (" + e.operation + ") :: " + getFileInfo(e));
 
            if (e.response.Rc != 'OK')
                addFileRow(e.files[0].name, e.response.ErrorMessages, e.response.CurrentTime, "uploadRowError""");
            else {
                var runCmd = "<div .... />";
                addFileRow(e.files[0].name, e.response.ErrorMessages, e.response.CurrentTime, "uploadRowSuccess", runCmd);
            }
        }
And the question: Can I mark the operation as failed in the onSuccess handler ? Thanks Shimshon
Shimshon
Top achievements
Rank 1
 asked on 14 Oct 2012
0 answers
101 views
Hi,
I am using KendoUI Grid in ASP.NET MVC3 Application and using MvcContrib.Mvc3-ci.3.0.73.0 for portable view. Everything in the grid working perfect. But having problem when I add "Batch Editing" feature. My error screen showing message like this:

The best overloaded method match for 'Kendo.Mvc.UI.Fluent.GridEditingSettingsBuilder<KendoGridMvcCodeFirst.Models.Customer>.Mode(Kendo.Mvc.UI.GridEditMode)' has some invalid arguments

I guess the issue is related to MvcContrib, because same code works in my another test application. My view page code look like this:

@(Html.Kendo().Grid<KendoGridMvcCodeFirst.Models.Customer>()
    .Name("Customers")
    .ToolBar(tb => tb.Create())
        .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable()
        
    .DataSource(dataSource => dataSource.Ajax()
            .Batch(true)
        .Model(model => model.Id(c => c.CustomerID))
        .Read("GetCustomers", "Home")
        .Update("UpdateCustomer", "Home")
        .Create("InsertCustomer", "Home")
        .Destroy("DeleteCustomer", "Home"))
    .Columns(cols =>
    {
        cols.Bound(c => c.CustomerID).EditorTemplateName("Integer");
        cols.Bound(c => c.Name).Width(300);
        cols.Bound(c => c.Phone);
        cols.Bound(c => c.Email);        
        cols.Command(cmd =>
        {
            cmd.Edit();
            cmd.Destroy();
        });
    })
)

Please help.

Thanks,
ARIF
Ariful
Top achievements
Rank 1
 asked on 13 Oct 2012
0 answers
110 views
Hi,

Does Kendo UI complete for MVC components such as Grid support RTL?
Arash
Top achievements
Rank 1
 asked on 13 Oct 2012
2 answers
749 views
All,

I've put together a sample application using Kendo UI for ASP.NET MVC at: Kendo UI ASP.NET Sample Applications

I've also written an article sharing my experience of putting together the sample application at: Kendo UI for ASP.NET MVC : Building a Forum Browser

I'll be putting together more sample applications as soon as I can!

Happy coding :-)

Regards,

John DeVight
John DeVight
Top achievements
Rank 1
 answered on 12 Oct 2012
1 answer
155 views
Can someone tell me, is it possible to do a call to a remote API with the combobox datasource???
I know it is possible using javascript, but i do not want to do it that way, please help

Regards
Gregory
Georgi Krustev
Telerik team
 answered on 12 Oct 2012
5 answers
404 views
Dear all,

I have a grid, with an ajax datasource, calling a function in my mvc controler. But the controler is never called by the grid.
What do I miss ?

Some informations:
Controler = InventoryOjbect (the controler is in an area, named Inventory)
Function  = GetInventory
The URL : "http://localhost/noolibee/InventoryObject/GetInventory" works

I added an event "Error" on the datasource, but the event is never triggered also. For me, it's a problem for the datasource to find the controler and call the function .. but where is the problem !!

The model
public class InventoryObjectModel
    {
        public InventoryObjectModel()
        {
 
        }
 
 
        public Guid Id { get; set; }
        public string Name { get; set; }
        public Guid PlaceId { get; set; }
        public Guid? ParentId { get; set; }
        public string PlaceName { get; set; }
        public Guid CategoryId { get; set; }
        public string CategoryName { get; set; }
        public string Extra1 { get; set; }
        public string Extra2 { get; set; }
        public string Extra3 { get; set; }
        public string TagSerial { get; set; }
 
        public Guid nodeId { get; set; }
        public string NodeSerial { get; set; }
 
 
    }

The Controler
public class InventoryObjectController : Controller
    {
        //
        // GET: /Inventory/InventoryObject/
 
        public ActionResult Index()
        {
             
 
            return View();
        }
 
        public ActionResult GetInventory([DataSourceRequest] DataSourceRequest request)
        {
            var o = GetObjects();
            DataSourceResult result = o.ToDataSourceResult(request);
            return Json(result, JsonRequestBehavior.AllowGet);
        }
 
 
        private List<InventoryObjectModel> GetObjects() { ... }
    }
The view
@{
    ViewBag.Title = "Inventory";
    ViewBag.MainTitle = "Inventory";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
 
<div>
    @(Html.Kendo().Grid<Noolibee.Presentation.Web.Administration.Areas.Inventory.Models.InventoryObjectModel>()
        .Name("Inventaire")
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model => model.Id(p => p.Id))
            .Read(read => read.Action("GetInventory", "InventoryObject"))
            .Events(events => events.Error("onError"))
        )      
     )
</div>
<script>
    function onError(e, status) {
        if (e.errors) {
            var message = "The following errors have occurred:\n";
 
            $.each(e.errors, function (key, value) {
                if (value.errors) {
                    message += value.errors;
                }
            });
 
            alert(message);
        }
    }
 </script>

Thanks for your help
Sylvain
Top achievements
Rank 1
 answered on 12 Oct 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
MultiColumnComboBox
Dialog
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?