Telerik Forums
Kendo UI for jQuery Forum
3 answers
241 views
I have a listview that is bound to an MVC controller, the view populates fine and pages fine, I would like to enable adding a new listview item so I added a template with a single textbox bound to an autocomplete that also populates from the server. All that works fine, but when I invoke the add on the listview, it is immediatly added to the listview and then the call appears in the controller. If the add executes then all is fine, if not then it is out of sync and there is no way to indicate to the listview to refresh or that an error occured. I have tried returning errors in the  same way a Grid expects them (JSON object with Data, Errors and Total), I have tried simply returning a 500 error, but I cant get seem to figure out how to indicate that the operation failed.

Attached are the razor view, the editor temmplate and the controller.

Thanks in advance for any advice


Nikolay Rusev
Telerik team
 answered on 18 Sep 2012
1 answer
204 views

Dear support team,

I use the Kendo UI grid inside a Bootstrap Responsive Layout.So if displayed on smartphones, I would need the following behavior:

Among all columns there should be a particular one, that keeps its optimal width whereas the others should be shrinked down to zero.How can I get this?

As far as I have seen, optimal column widths are available if Grid.Scrollable is set to false.On the other hand, if Scrollable == true and I do not set the width of a certain column, it will fill the gap that is left over from the other columns' common width. Is there a public(?) Kendo function that calculates the optimal column width for a given set of data,that I can call in the dataBound eventhandler?

Best regards,

Dimo
Telerik team
 answered on 18 Sep 2012
6 answers
155 views
Hi, I need to write a really complex grid, and I know that out of the box, kendo UI (or any other framework) will not support the features, so I'm trying to figure out what exactly Kendo UI can do and how resistant to tampering it is.  Mainly I just want a uniform look across platforms and have simple functionality available to me.

a) Does Kendo  UI support headers on the Y axis?  Like my grid needs to have headers, subheaders, sub-subheaders on both X and Y axis (ie on the top and on the left).

b) Can I Insert multiple rows at once at any point on the grid?  I've seen .addRow and datasource.Insert, but nothing for inserting multiple rows at once

c) Does it do colspan and rowspan correctly?  I saw one forum post, but no answers.  Because I need headers and subheaders, obv. the headers need to span multiple columns, and then the subheaders will span less columns, and sub-subheaders will span even less columns.

d) I will need to basically override all custom events that the grid does, I assume I can prevent all default behaviour using e.preventdefault like in telerik mvc

e) I will need to do column insertion (sort of like a row-detail view, but for columns).  If I do this manually into the grid, will it break anything?  I'm likely going to be preventing default for most things, so I'm wondering how much appending <td> to the grid would affect things.  I don't want any javascript to break because there's now a new column.

Thanks.
Jayson
Top achievements
Rank 1
 answered on 18 Sep 2012
1 answer
236 views
I have defined a grid like this:
@(Html.Kendo().Grid(Model)
             .Name("OnlineVisitors")
             .Columns(c =>
                {                  
                    c.Bound(p => p.DurationInMinute).Title("duration");
                    c.Bound(p => p.PersianStartDate).Title("start time");
                    c.Bound(p => p.IP).Title("IP Address");
                })
             .DataSource(datasource =>
                 datasource.Ajax()
                           .Read(read => read.Action("JsonList", "OnlineVisitors", routeKeyValues))
             )
)
And now i want to refresh the grid in JavaScript code,after an Ajax call to server,that do something with data source i'm using.any help will be appreciated.
Herbert
Top achievements
Rank 1
 answered on 18 Sep 2012
0 answers
172 views
Hello Sorry for the mistake. The letter was written by an automatic translator.
At the project makes the transition to Kendo. Use the MVC 3. In the old project to the grid using the class

@ model GridModel <CustomerViewModel>

@ (Html.Telerik (). Grid <CustomerViewModel> () ......)

Class GridModel <T> not in Kendo. How it can be converted for Kendo?

Thank you.
Eugene.
Evgeniy
Top achievements
Rank 1
 asked on 18 Sep 2012
2 answers
350 views
I'm using Kendo UI AutoComplete linked up to a Web Method.  It works great. 
What I am trying to do now is to have a link on the page and when clicked it will populate the autocomplete input value and then refresh the datasource based on that value.  

I can easily populate the autocomplete value with $("#search_input").data("kendoAutoComplete").value(name);  However, the data does not refresh when I do this, it still has the resultset from the previous search. How can an invoke the AutoComplete to behave as if I typed in the new value, so that the datasource result set refreshes based on the new input value?

   $("#search_input").kendoAutoComplete({
            minLength: 1,
            dataSource:
            {
                serverFiltering: true,
                serverPaging: true,
                pageSize: 20,
                transport:
                {
                    read:
                    {
                        url: "Default.aspx/GetSearchAutoComplete",
                        data: function () {
                            return { Param: $("#search_input").data("kendoAutoComplete").value() };
                        },
                        contentType: 'application/json; charset=utf-8',
                        type: 'POST',
                        dataType: 'json'
                    },
                    parameterMap: function (options) {
                        return kendo.stringify(options);
                    }
                },
                schema:
                {
                    data: function (data) {
                        searchData = data.d
                        return data.d;
                    }
                }
            },
            dataTextField: "Name",
            dataValueField: "Id"
            select: function (e) {
                searchSelectedIndex = e.item.index();
                SearchSelect();
            }
        });
Darcy
Top achievements
Rank 1
 answered on 18 Sep 2012
3 answers
383 views
Hello I am tryint to bind create action from Kendo Grid:

@(Html.Kendo().Grid(Model.GlobalProperties).Name("GlobalProperties")
    .Columns(columns =>
    {
        columns.Bound(p => p.Id).Hidden();
        columns.Bound(p => p.Name);
        columns.Bound(p => p.Value);
    })
    .DataSource(dataSource => dataSource.Ajax().Batch(true)
        .Model(model => model.Id(p => p.Id))
        .Create("GlobalProperty_Create", "Admin")
        .Update("GlobalProperty_Editing_Update", "Admin")
        .Destroy("GlobalProperty_Editing_Destroy", "Admin")
    )
    .ToolBar(toolbar =>
    {
        toolbar.Create();
        toolbar.Save();
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
)

This is supposed to send Create action to my Admin controller (this works)

public ActionResult GlobalProperty_Create(List<GlobalProperties> models)
       {
           using (var db = new CPSkla.Models.CPSklaEntitiesCalculation())
           {
               foreach (GlobalProperties model in models)
               {
                   db.GlobalProperties.Add(model);
                   db.SaveChanges();
               }
           }
           return View(GetViewResult());
       }

Now if I try to create ne record it will trigger my breakpoint in controller but the list (although it has Count=1 for one new record) has GlobalProperty object but with all values (Id,Name,Value) null.

My firebug shows that I have
models[0][id]  0
models[0][name] test
models[0][value] testssss
as a part of my parametres, how do I serialize that to my List?

Please help I was trying to find it but without success.
Nohinn
Top achievements
Rank 1
 answered on 18 Sep 2012
0 answers
123 views
First off, I realise this is probably a niche area, but I get a script error when filtering against a Guid column. I've an MVC wrapper grid using server side paging & filtering; this all works fine. However, when the results are returned to the client a script error occurs: "TypeError: b._parse is not a function". This appears in the _bind method. It's not critical, the filtering works and the grid displays OK (with SP1) but it's probably worth looking into.

I've uploaded a sample project: https://skydrive.live.com/redir?resid=635C8E2BF4822D7C!1064

This project uses the standard release, which I think does have an issue with the re-binding of the grid, but I'm using SP1 in the main project and apart from the script error, all seems fine.
Dave
Top achievements
Rank 1
 asked on 18 Sep 2012
3 answers
158 views
Hello Sir'

Iwant to show the all user list by using kendo gri but i m very new for kendo ui please help me
Nohinn
Top achievements
Rank 1
 answered on 18 Sep 2012
3 answers
226 views
Dear Kendo Team,
I have a problem in running mvc 4 app which uses kendo in the release mode (debug="false"). I started a sample application, went through the getting started guide. Everything seems to work until I change compilation debug="false" node in web.config.
I attach the sample app. Could you please take a look at the code and tell me what is wrong with it?
Cheers!
Piotrek
Alex Gyoshev
Telerik team
 answered on 18 Sep 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
Application
Map
Drag and Drop
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
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?