Telerik Forums
Kendo UI for jQuery Forum
1 answer
70 views
Hi!

I'm sorry for my bad english.

I have a problem with grid's components, when the grid is in edit mode don't show kendo's components but a asp.Net MVC components.

ViewModel:
    public class ProjetoViewModel
    {
        public int IdProjeto { get; set; }
        [DisplayName("CodigoProjeto")]
        public string CodigoProjeto { get; set; }
        [DisplayName("Nome")]
        [DataType(DataType.Text)]
        public string Nome { get; set; }
        [DisplayName("AnoInicial")]
        [DataType("Integer")]
        [Range(0, int.MaxValue)]
        public int AnoInicial { get; set; }
    }

Grid:
@(Html.Kendo().Grid<DemurrageWeb_ViewModel.Sistema.ProjetoViewModel>()
        .Name("GridProjeto")
        .Columns(columns =>
        {
            columns.Command(command =>
            {
                command.Destroy().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Excluir });
                command.Edit().HtmlAttributes(new { @title = @DemurrageWeb_Resource.Util.Button.Alterar });
            }).Width(111).HtmlAttributes(new { @class = "Icon" });
            columns.Bound(p => p.IdProjeto).Hidden(true);
            columns.Bound(p => p.Nome).Width("50%");
            columns.Bound(p => p.CodigoProjeto).Width("30%");
            columns.Bound(p => p.AnoInicial).Width("20%");
        })
        .ToolBar(toolbar =>
        {
            toolbar.Create().Text("").HtmlAttributes(new { @class = "Icon icAdd", @title = @DemurrageWeb_Resource.Util.Button.Inserir });
        })
        .Editable(editable => editable.Mode(GridEditMode.PopUp))
        .Pageable(pg =>
        {
            pg.Refresh(true);
            pg.PageSizes(new[] { 10, 20, 30 });
            pg.Input(true); pg.Numeric(false);
        })
        .Sortable()
        .Scrollable(s => s.Enabled(true).Height("100%"))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Events(events => events.Error("error_handler"))
            .Model(model => model.Id(p => p.IdProjeto))
            .Batch(true)
            .Read("Projeto_Read", "SProjeto")
            .Create("Projeto_Create", "SProjeto")
            .Update("Projeto_Update", "SProjeto")
            .Destroy("Projeto_Destroy", "SProjeto")
            .ServerOperation(false)
        )
    )

I'm with 2012 Q3 version of kendo UI.





Marcos
Top achievements
Rank 1
 answered on 22 Feb 2013
1 answer
147 views
Hi I have a checkbox column in a grid , and i need to update the records based on the check box selected.
Remaining columns in the grid are read only

My question here is when I check and followed by uncheck for a particular row , that row is still in edit state , since i am not doing the reverse of "Set". How do i take out that row from saving?

                   $('.check_row').live('click', function (e) {

                        var topDeviceRoleCode = $("#ddlHeaderDeviceRoleCode").data("kendoDropDownList").value();
                        //alert(topDeviceRoleCode);

                        var grid = $("#DeviceDetailsGrid").data("kendoGrid");

                        var models = [];

                        //find the selected models
                        grid.tbody
                                        .find(":checked")
                                        .closest("tr")
                                        .each(function () {
                                            models.push(grid.dataItem(this));
                                        });

                        //update the models value
                        for (var i = 0, length = models.length; i < length; i++) {
                            models[i].set("DeviceRole", topDeviceRoleCode);
                        }

                    });

Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Feb 2013
3 answers
88 views
Unfortunately I seem not able to get this to work in a jsbin/jsfiddle example, but I have video demonstrating strange behaviour when I open a detailscreen from a listview with endless scroll and and then go back from the detailscreen to the listview. All items seem to be gone, but disappear when i slide my finger over the screen.

Here is a video demonstrating the problem: https://www.dropbox.com/s/8jtuvprfn9ooaex/demo.mp4



Ivan Ivanov
Telerik team
 answered on 22 Feb 2013
1 answer
146 views
Hello,

 I'm trying to build small application with kendo mobile. I have list and want to put icon for every item but if this list is in template icons don't show

 <div data-role="view" data-title="" id="side-root">
   <ul data-role="listview" data-style="inset" data-source="splitViewCategories" data-template="categoriesTemplate">
   </ul>
 </div>
 <script id="categoriesTemplate" type="text/x-kendo-template">
   <a data-icon="about" href=">Category</a>
 </script>
If I use ready list like this

<ul data-role="listview" data-style="inset">
 <li data-icon="about"><a>about</a></li>
 <li data-icon="action"><a>action</a></li>
 <li data-icon="add"><a>add</a></li>                    
</ul>
I can see icons

Thanks,
Mariyana
Alexander Valchev
Telerik team
 answered on 22 Feb 2013
2 answers
239 views
I have 2 panes in my splitter.  No matter what I do, the right hand pane is always overlaying the position of the left hand pane, i.e. style=left:0px.  How can I fix it so that the right hand pane appears to the right of the left hand one?  Aslo, the size of the pane is not correct and does not reflect the sizes I set in the cshtml.

When I resize the broswer window, it displays as it should- it is just on the initial render that it doesn't work.  Code is below:

@{
    
    Html.Kendo().Splitter()
        .Name("report-splitter")      
        .Panes(panes =>
                   {
                       //Report List
                       panes.Add().Size("250px").Resizable(false).Scrollable(false)
                           .LoadContentFrom(Url.Action("ReportList", "Report", new { Group = reportingContextType }));
                       //Report Details
                       panes.Add().Size("650px").Resizable(false).Scrollable(false)
                            .Content(@<text>
                                          <div id="report-toolbar" class="report-toolbar"></div>
                                          <div id="report-parameters"></div>                                        
                                          <div id="report-body" >
                                              <div style="text-align: center">
                                                  <p>Select a report from the list</p>
                                                  <br/>
                                                  <img src="~/Images/report.png" />
                                              </div>
                                          </div>
                                      </text>);
                   })
        .HtmlAttributes(new { style = "min-height: 600px;" })//forcing the splitter to be bigger than default 300px
        .Render();
}
<script>
    $(document).ready(function (e) {
        $("#report-splitter").kendoSplitter({
            panes: [
                { resizable:false, collapsible: false, size: "250px" },
                { resizable: false, collapsible: false, size: "650px" }
            ]
        });
    });
</script>
Petur Subev
Telerik team
 answered on 22 Feb 2013
1 answer
259 views
Apologies if this has been answered somewhere (couldn't find anything though)...

I have an MVC4 project and I'm using the MVC controls to add a menu to the page from a partial view.

On the _Layout.cshtml file I have:
<div id="navigation">
    @Html.Action("Navigation", "Core")
</div>
And then in the Navigation.cshtml file I have:
@{
    Html.Kendo().Menu().Name("menu").Items(menu => {
        menu.Add().Text("Home").Action("Index", "Home");
        menu.Add().Text("ACH Entry").Action("ACHEntry", "Home");
        menu.Add().Text("CC Entry").Action("CCEntry", "Home");
        menu.Add().Text("ACH and CC Search").Action("ACHCCSearch", "Home");
        menu.Add().Text("ACH and CC Edit").Action("ACHCCEdit", "Home");
        menu.Add().Text("ACH Processing").Action("ACHProcessing", "Home");
        menu.Add().Text("CC Processing").Action("CCProcessing", "Home");
        menu.Add().Text("ACH and CC On-Hold Report").Action("ACHCCOnHoldReport", "Home");
        menu.Add().Text("ACH and CC Activity Search").Action("ACHCCActivitySearch", "Home");
        menu.Add().Text("Generate DDA File List").Action("GenerateDDAFileList", "Home");
        menu.Add().Text("Series End Report").Action("SeriesEndReport", "Home"); }).Orientation(MenuOrientation.Vertical));
}
(Sorry for squishing it together.  The debugger threw exceptions when I had items on different lines, too).

However, I get a very non-descript error message whining about a missing semicolon, when this would work fine on the _Layout.cshtml page.  I really don't want to put it there unless I have no other choice.  There error is:

HttpException:

   Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

The inner exception reveals:

   Navigation.cshtml(15): error CS1002: ; expected"

But none of that would happen on the _Layout.cshtml page.
Thoughts?
Phil
Top achievements
Rank 1
 answered on 22 Feb 2013
1 answer
136 views
When i try to change text of built-in commands (for example: create), then kendoGrid command doesn't work properly (no action). I just changed the grid "editing" example from

 $("#grid").kendoGrid({
                        dataSource: dataSource,
                        navigatable: true,
                        pageable: true,
                        height: 400,
                        toolbar: ["create", "save", "cancel"],

to

 $("#grid").kendoGrid({
                        dataSource: dataSource,
                        navigatable: true,
                        pageable: true,
                        height: 400,
                        toolbar: [{ command: "create", text: "Custom text" }, "save", "cancel"],


It's seems that event does not bind automatically or is something else?

Thank's.

AG
AG
Top achievements
Rank 1
 answered on 22 Feb 2013
1 answer
205 views
I have 2 tabs, each displaying a Kendo Grid.  If I postback from a grid (e.g. to sort a column) the page refreshes and the tab reverts to the default (1st) tab each time.

Is there a away to have the tab strip remember the tab it was on before the post back and display it?

Regards,
Andrew
Petur Subev
Telerik team
 answered on 22 Feb 2013
3 answers
136 views
Hi, 
I found that kendo treeview automatically change  the id of a node when selecting that node..

example:
<ul class="k-group" style="">
    <li id="idItem1" class="k-item" data-uid="f15ccb0c-f3d8-4a56-bebd-e9d14d2dc877" role="treeitem">
        <div class="k-top">
            <span class="k-icon k-plus"></span>
            <span class="k-in">
                <span class="k-sprite folder"></span>Item1
            </span>
        </div>
        <ul class="k-group" style="display: none;">
            <li class="customClass k-item k-last" id="CustomId" data-uid="f244d97f-2adb-4e49-b40a-3766dd1eba92" role="treeitem">
                <div class="k-bot">
                    <span class="k-in">
                        <span class="k-sprite pdf"></span>Sub-Item1
                    </span>
                </div>
            </li>
        </ul>
    </li>
    <li id="idItem2" class="k-item" data-uid="8da3519c-27cd-49e6-a478-6e4cf1ccd3d0" role="treeitem">
        <div class="k-mid">
            <span class="k-in">
                <span class="k-sprite folder"></span>Item2
            </span>
        </div>
    </li>
</ul>
this is the default state; then if i select a node, its id change into

id="treeName_tv_active"
and once i select another node, its became just an empty field..

now, I saw that seems to be the "design" behavior for this control...
the problem is that if I can't get the Id of the node (I use this treeview to filter a listView and its pager).

I personally think that change the id of node is not a good behavior...I usually see some added classes to manage control's states...
Is there anyway of preventing this behavior?

Thanks
Fabio
Dimiter Madjarov
Telerik team
 answered on 22 Feb 2013
4 answers
729 views
Hi!  
I have a problem with MySQL date format and DatePicker

I have one table in Mysql with one field : fechafinmantenimiento is datetime
in the table one register is like this : 2013-02-14 00:00:00

I have a Grid this is the code in the datasource :
fechafinmantenimiento: { type: "date", format: "MMMM-dd-yyyy" },
code in column :
{ field: "fechafinmantenimiento", title: "Finalización Tipo Mantenimiento", template: '#= kendo.toString(fechafinmantenimiento,"dd/MM/yyyy") #', width: 150},

Code DatePicker definition:
$("#cargarfechafinmantenimiento").kendoDatePicker({
  format: "MM-dd-yyyy"
})

On the Grid I see the value like this: 14/02/2013 <-Correct for me!

When I select a row on the grid, send the date value to the input form
<input id="cargarfechafinmantenimiento" name="fechafinmantenimiento" style="width:150px"/>

But in the input form I see the value like this : Thu Feb 14 2013 00:00:00 GMT+0100 (Hora estándar romance)

Only when I select another date on the widget, then show me the date format like this : 02-20-2013

What is wrong? a bug? a code? bad interpretation between mysql and kendoUI (javascript)?

Thank you

JC
JC
Top achievements
Rank 1
 answered on 22 Feb 2013
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?