Telerik Forums
Kendo UI for jQuery Forum
1 answer
80 views
Hi,

When I add new, the model look like this.

models=%5B%7B%22ProductID%22%3Anull%2C%22ProductName%22%3A%22Fx%22%7D%5D
I would like to serial it into JSON.

How to access those models?

MVC 4 web apis.
Best,
WP

Weera
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
132 views
I have a grid with all column widths set. On browsers other than IE 7, when the grid is wider than the combined set width of all the columns, the header columns and body columns expand to fit the entire horizontal space. On IE 7, only the header columns expand while the body columns do not.
Weera
Top achievements
Rank 1
 answered on 03 Oct 2012
0 answers
273 views
good morning everyone,

i am currently using a licensed version of Kendo UI Complete for ASP.NET MVC (Q2 2012)  and trying to render the checkboxes for the TreeView.  I am using the TreeView wrapper for MVC.  I am looking at the example on the demos kendo UI site and something doesn't look right in the example.

the demo site is at:  http://demos.kendoui.com/web/treeview/checkboxes.html

Does the Kendo UI TreeView Wrapper, have a method called "Checkboxes"???  because this would really help my situation right now.  The version of my Kendo UI Wrapper, doesn't seem to have the "Checkboxes" method.  I am trying to achieve the same checkbox functionality like how it is on the demo site:  http://demos.kendoui.com/web/treeview/checkboxes.html

I have attached a screenshot of what i saw on the demo site and below is the sample demo code out there for the public to look at, as reference.  

@(Html.Kendo().TreeView()
                .Name("treeview")
                .Checkboxes(checkboxes => checkboxes
                    .CheckChildren(true)
                )
                .Items(treeview =>
                {
                    treeview.Add().Text("Furniture").Id("1")
                        .Expanded(true)
                        .Items(furniture =>
                        {
                            furniture.Add().Text("Tables & Chairs").Id("2");
                            furniture.Add().Text("Sofas").Id("3");
                            furniture.Add().Text("Occasional Furniture").Id("4");
                        });
 
                    treeview.Add().Text("Decor").Id("5")
                        .Expanded(true)
                        .Items(furniture =>
                        {
                            furniture.Add().Text("Bed Linen").Id("6");
                            furniture.Add().Text("Curtains & Blinds").Id("7");
                            furniture.Add().Text("Carpets").Id("8");
                        });
                })
            )

When I tried to use the above code with my version of the Kendo UI Treeview wrapper, i get an error with the "Checkboxes" method.

@(Html.Kendo().TreeView()
                    .Name("Blah")
                    .Checkboxes( checkbox =>
                    {
                    })
                    .DataSource( dataSource =>
                    {
                    })
                )


Also, it seems that the datasource for checkboxes.cshtml and checkboxes.html examples on the demo site, are different.

Thank you very much
Sam
Top achievements
Rank 1
 asked on 03 Oct 2012
0 answers
76 views
Hi,



    How do I get parameter set ajax request in asp.net?
Renato
Top achievements
Rank 1
 asked on 02 Oct 2012
3 answers
197 views
I'm trying to display details in a grid, but when I put breakpoints in the controller, the app is ignoring the .Read and never hits the controller after the initial load of the page.

Here's my Index.cshtml:

@functions {

    private void AccountGridCommandDef(GridColumnFactory<PosPayAndBankRec.Models.AccountListItem> columns)
 {
  columns.Command(command => { command.Edit(); command.Destroy(); }).Width(180);
        columns.Bound(p => p.AccountID).Hidden();
        columns.Bound(p => p.SourceName).Title("Source");
        columns.Bound(p => p.BankName).Title("Bank");
        columns.Bound(p => p.AccountName).Title("Account");
        columns.Bound(p => p.AccountNumber).Title("Acct #");
        columns.Bound(p => p.AccountFolderName).Title("Folder");
        columns.Bound(p => p.RamQuestBankNumber).Title("Bank #");
        //columns.ForeignKey(p => p.AccountID, (IEnumerable<ORTAccount>)ViewBag.Accounts, "AccountID", "AccountName");
 }

 private void AccountGridDataSource(DataSourceBuilder<PosPayAndBankRec.Models.AccountListItem> dataSource)
 {
        dataSource.Ajax()
            .Model(AjaxDataSourceBuilder)
            .Sort(sort => sort.Add(p => p.BankName))
            .ServerOperation(true)
            .Create(create => create.Action("Create", "Account"))
            .Read(read => read.Action("Read", "Account"))
            .Update(update => update.Action("Update", "Account"))
            .Destroy(destroy => destroy.Action("Delete", "Account"));
            //.Events(e => e.Error("error"));
 }

 private void AjaxDataSourceBuilder(DataSourceModelDescriptorFactory<PosPayAndBankRec.Models.AccountListItem> model)
 {
        model.Id(p => p.AccountID);
        model.Field(p => p.AccountName);
 }

 private void AccountGridToolBarDef(GridToolBarCommandFactory<PosPayAndBankRec.Models.AccountListItem> toolbar)
 {
  toolbar.Create().Text("New Account");
 }
}

@{ ViewBag.Title = "Accounts"; }
@(Html.Kendo().Grid<PosPayAndBankRec.Models.AccountListItem>()
 .Name("Accounts")
 .Columns(AccountGridCommandDef)
 .DataSource(AccountGridDataSource)
        .ToolBar(AccountGridToolBarDef)
        .Editable(c => c.Mode(GridEditMode.PopUp).Enabled(true).DisplayDeleteConfirmation(true).Window(window => window.Title("Account")).TemplateName("AccountPopup").AdditionalViewData(new { Sources = Model.Sources, Banks = Model.Banks }))
 .Sortable()
    .ClientDetailTemplateId("AccountDetails")
 .Pageable(p => p.Enabled(false))
 .Scrollable(s => { s.Height(375); s.Virtual(true); })
)

     

<script id="AccountDetails" type="text/kendo-tmpl">
    @(Html.Kendo().TabStrip()
            .Name("TabStrip_#=AccountID#")
            .SelectedIndex(0)
            .Items(items =>
                       {
                           items.Add().Text("Details").Content(
                               @<text>
                    @(Html.Kendo().Grid<PosPayAndBankRec.Models.AccountListItem>()
                            .Name("Details_#=AccountID#")
                            .Columns(columns =>
                                        {
                                            columns.Bound(p => p.BankAccountName).Width(101);
                                            columns.Bound(p => p.RamQuestDatabaseName).Width(140);
                                            columns.Bound(p => p.RamQuestBankNumberStacked).Width(200);
                                            columns.Bound(p => p.AccountNotes).Width(200);
                                        })
                            .DataSource(dataSource => dataSource
                                                        .Ajax()
                                                        .Read(read => read.Action("Details", "Account", new {id = "#=AccountID#"}))
                            )
                            .Pageable()
                            .Sortable()
                            .ToClientTemplate())
                </text>);




Here's my AccountController.cs:

using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;
using PosPayAndBankRec.Domain.Models;
using System.Data.Entity;
using PosPayAndBankRec.Models;
using System.Data.Entity.Validation;
using Kendo.Mvc.UI;
using Kendo.Mvc.Extensions;

namespace PosPayAndBankRec.Controllers
{
    public class AccountController : BaseController
    {
        private EFTDBContext db = new EFTDBContext();

        public ActionResult Read([DataSourceRequest] DataSourceRequest request)
        {
            var ortaccounts = (from account in db.ORTAccounts
                              join source in db.ORTSources on account.SourceID equals source.SourceID
                              join bank in db.ORTBanks on account.BankID equals bank.BankID
                              select new AccountListItem()
                              {
                                  AccountID = account.AccountID,
                                  BankID = account.BankID,
                                  SourceID = account.SourceID,
                                  AccountName = account.AccountName,
                                  AccountNumber = account.AccountNumber,
                                  AccountFolderName = account.AccountFolderName,
                                  BankAccountName = account.BankAccountName,
                                  BankName = bank.BankName,
                                  RamQuestBankNumber = account.RamQuestBankNumber,
                                  SourceName = source.SourceName,
                                  RamQuestDatabaseName = account.RamQuestDatabaseName,
                                  RamQuestBankNumberStacked = account.RamQuestBankNumberStacked,
                                  AccountNotes = account.AccountNotes
                              }).ToDataSourceResult(request);

            //var sources = db.ORTSources.ToDataSourceResult(request);
            //var banks = db.ORTBanks.ToDataSourceResult(request);

            //return View(viewData);
            return Json(ortaccounts, JsonRequestBehavior.AllowGet);
        }

        [HttpGet]
        public ActionResult Details(int id)
        {
            var ortaccounts = from account in db.ORTAccounts
                              join source in db.ORTSources on account.SourceID equals source.SourceID
                              join bank in db.ORTBanks on account.BankID equals bank.BankID
                              where account.AccountID == id

                             select new AccountDetailsModel()
                              {
                                  AccountID = account.AccountID,
                                  AccountFolderName = account.AccountFolderName,
                                  AccountName = account.AccountName,
                                  AccountNumber = account.AccountNumber,
                                  BankID = account.BankID,
                                  BankName = bank.BankName,
                                  RamQuestBankNumber = account.RamQuestBankNumber,
                                  SourceName = source.SourceName,
                                  AccountNotes = account.AccountNotes,
                                  BankAccountName = account.BankAccountName,
                                  RamQuestDatabaseName = account.RamQuestDatabaseName,
                                  RamQuestBankNumberStacked = account.RamQuestBankNumberStacked
                              };
            var ortaccount = ortaccounts.FirstOrDefault();
            if (ortaccounts == null)
            {
                return RedirectToAction("Error");
            }
            else
            {
                return View(ortaccount);
            }
        }

Alex
Top achievements
Rank 1
 answered on 02 Oct 2012
9 answers
568 views
I have a grid that has a large number of columns (50).  Although the user will likely only select a few columns to view, he/she needs the ability to select from any of the 50 columns. Unfortunately, on most displays, the kendo grid column menu will be greater than the display. Is there a way to make the column menu scrollable or set sub-menus (that contain groups of columns) within the column menu?
James
Top achievements
Rank 1
 answered on 02 Oct 2012
0 answers
61 views
I have a custom function to conditionally color some of my cells in a kendo grid. 
I would like to call it everytime the grid needs it. so after it refreshes, after databinding and after sort or any grid change..... and so on

can I do it without using a template? thanks
Vland
Top achievements
Rank 1
 asked on 02 Oct 2012
1 answer
84 views
I'm not sure if this is a known issue but I was unable to find any related posts on the forums. On an iPad with iOS 5 or iOS 6, if you press into a numeric textbox, the first press does not bring up the keyboard. The first press only changes the input to numbers only (if it was a currency or percent). The second press brings up the keyboard.

Is there a way I can change the inputs so that the keyboard opens on the first press?

I was able to re-create this issue using the Globlization demos found here (as well as my own code): http://demos.kendoui.com/web/globalization/index.html.
Georgi Krustev
Telerik team
 answered on 02 Oct 2012
0 answers
224 views
Is there a list of unallowed parameter names?

I had

schema: {
                model: {
                    id: "id",
                    hasChildren: "hasChildren",
                    children: "items",
                    fields: {
                        level: {
                            type: "number",
                            editable: true,
                            nullable: false
                        }
                    }
                }
            }

Which kept failing for some unknown reason.  Eventually I tried changing a working dataSource's extra param to "level" and it started failing.  Then I realized that "level" must already be used in dataSource or something.
Kuangyi
Top achievements
Rank 1
 asked on 02 Oct 2012
1 answer
256 views
I am using an autocomplete control:

var data = ["Books", "Movies", "Music"];

$("#input").kendoAutoComplete({
    dataSource: data,
    placeholder: "Select Category..."
});

For some reason the list of options is replacing the text box instead of showing below the input box. See the attached screenshots.

Why is this happening?

Pechka
Top achievements
Rank 1
 answered on 02 Oct 2012
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
Drag and Drop
Application
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?