Telerik Forums
Kendo UI for jQuery Forum
1 answer
102 views

We are using virtual scrolling in our grid. And the Grid allows InCell editing to users. Now when user updates the value in a cell, we immediately want to display the Total in the footer. We cannot refetch all the data for the page for each user edit. 

The client side data has only as many rows as the pagesize() - so calculating client side total is not accurate.

We can calculate the total on the server side but we need some function that only gets the Aggregates in the result and updates the footer portion - we cannot afford refetch the whole page data.

Please tell us what are our options.
Kiril Nikolov
Telerik team
 answered on 22 Oct 2014
6 answers
176 views
hi,
it is a follow up to: link

I have a grid with custom editor:

{ field: "Application", title: "Owned By", width: "120px", editor: applicationDropDownEditor, template: "#=Application.ApplicationName#" }

editor:
var applicationDataSource = {
                type: "odata",
                transport: {
                    read: {
                        url: "odata/Sys_Application",
                        dataType: "json",
                        type: "GET"
                    },
                },
                schema: {
                    data: "value",
                    total: "count"
                },
            }
 
            function applicationDropDownEditor(container, options) {
                $('<input required data-bind="value:' + options.field + '"/>')
                    .appendTo(container)
                    .kendoDropDownList({
                        autoBind: false,
                        dataTextField: "ApplicationName",
                        dataValueField: "ApplicationRef",
                        dataSource: applicationDataSource
 
                    });
            }


I am trying to add a new record. So I click add new enter values select value form drop down. That is when I encounter my first problem - I can't select first value - I can select it but is not recognised as selection and when cell looses focus I am loosing value.

Than I press Save and data is sent to odata controller

// POST: odata/Entities
        public async Task<IHttpActionResult> Post(Entity entity)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }
 
            db.Entry(entity.Application).State = EntityState.Unchanged;
 
            db.Entities.Add(entity);
            await db.SaveChangesAsync();
 
            return Created(entity);
        }

Here I am saving record to db. Following this article  I had to mark drop down data as unchanged to make sure EF will not try to reinsert values. Then I am sending created entity back to client.

As I am using web api odbc v3 I had to make some changes to schema, data value

schema: {
                       data: function (data) {
                           if (data.value) {
                               return data.value;
                           }
                           delete data["odata.metadata"];
                           return [data];
                       }

And that is when my second problem starts - returned data has no Application property and that is what my field template is expecting - I have only ApplicationRef which is a foreign key.

How can I make sure that my new row will display a correct value in  drop down list when new record is saved and made a round trip to server and back?

Please find sample project: here
Daniel
Telerik team
 answered on 22 Oct 2014
4 answers
118 views
Hello,

I have nsted splitter which Displays fine on Desktop Browsers. but when displayed on tablet browser ipad/android do not Show all panes. even if collapcible is false , once i resize window the panes are visible properly. I tried forcing resize in document ready but then page hangs and never loads. Attached my view code.

i Need 2 horizontal panes inside splitter and each horizontal pane should have 2 vertical panes inside.
thanks

Anamika
Dimo
Telerik team
 answered on 22 Oct 2014
1 answer
356 views
Is there an easy way to hide the entire detail template expansion chevron and associated column? We'd like to control the expansion through other means.
Nikolay Rusev
Telerik team
 answered on 22 Oct 2014
1 answer
115 views
Hi there,

I'm currently evaluating Kendo UI, and I've been unsuccessfully trying to bind the "dataBound" event on a TreeMap to the function, "dataBund". The binding seems to take place, but the event does not seem to fire.

$().ready(function () {
    var ds = [/*snip*/];
 
    $("#treemap").kendoTreeMap({
        dataSource: {
            data: ds,
            schema: {
                model: {
                    children: "items"
                }
            }
        },
        valueField: "value",
        textField: "name"
    });
 
    function dataBund(e) {
        console.log("DataBound");
    }
 
    var treemap = $("#treemap").getKendoTreeMap();
    treemap.bind("dataBound", dataBund);
});

I have a JSFiddle demonstrating this at http://jsfiddle.net/johncdtex/frm5rgq7/45/

Kind Regard,
John C
Hristo Germanov
Telerik team
 answered on 22 Oct 2014
1 answer
387 views
Hello,

CheckBox is not displayed in the clientdetailtemplate. If I comment the .clienttemplate for checkbox then true or false is shown.
I am unable to find out why is this happening. However,  I can get checkbox working in the main grid (not part of clientdetailtemplate) in some other code/ place


The code for clientdetail template is given and I want IsReminder and IsPrivate to be checkboxes and this is not working...
------------------------------
<script id = "clientTab-template" type="text/kendo-templ">

@(Html.Kendo().TabStrip()
    .Name("tabStrip1")
    .SelectedIndex(0)
    .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
    .Items(items =>
    {
        items.Add().Text("Information").HtmlAttributes(new { @style = "font-size:x-small" }).Content(
       
       "<div id=Information >" +
            "<table class='table-thinborder100'>" +
                
                "<tr  style= 'border-bottom-style:solid; border-bottom-width:thin'>" +
                    "<td  class='col-width15'>" +
                            "<label> Street </label>"   +
                    "</td>" +
                    "<td class = 'col-width30 ls-label-field-ucase' >" +
                            " #=Address1# "  +
                    "</td>" +

                    "<td class='col-width20'>" +
                            "<label> Home Phone 2 </label>"   +
                    "</td>" +
                    "<td class = 'col-width35 ls-label-field-ucase' >" +
                            " #=Phone2#  "  +
                    "</td>" +
                "</tr>" +

                 "<tr>" +
                    "<td class='col-width15'>" +
                            "<label> EmpHomeAdd </label>"   +
                    "</td>" +
                    "<td class = 'col-width30 ls-label-field-ucase' >" +
                            " #=Address2# "  +
                    "</td>" +

                    "<td class='col-width20'>" +
                            "<label> Home Email 2 </label>"   +
                    "</td>" +
                    "<td class = 'col-width35 ls-label-field-ucase' >" +
                            " #=HomeEmail# "  +
                    "</td>" +
                "</tr>" +


                "<tr>" +
                    "<td class='col-width15'>" +
                            "<label> Status </label>"   +
                    "</td>" +
                    "<td class = 'col-width30 ls-label-field-ucase' >" +
                            " #=PartyStatus.StatusName# "  +
                    "</td>" +

                    "<td class='col-width20'>" +
                            "<label> Emp-ID </label>"   +
                    "</td>" +
                    "<td class = 'col-width35 ls-label-field-ucase' >" +
                            " #=EmployeeId# "  +
                    "</td>" +
                "</tr>" +

             "</table>" +
        "</div>"


       //     "<div  >" +
         //   "<label> EmpHomeAdd: </label>#=Address2# " + "," +
          // " <label> HomePhone2: </label>#=Phone2# " + " ," +
            //" <label> Status: </label>#=PartyStatus.StatusName# " +

            //"</div>"
            );


       items.Add().Text("Events").HtmlAttributes(new { @style = "font-size:x-small" }).Content(obj =>
           Html.Kendo().Grid<ERPLiteModelsServices.Areas.Home.Models.EventModel>()
            .Name("grid2")
            .Columns(columns =>
            {
                columns.Bound(o => o.EventStartDateTime).Title("Start").Width("8%").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.EventEndDateTime).Title("End").Width("8%").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.Customer.CustomerName).Title("Event-Cust").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });//.ClientTemplate("#=Customer.CustomerName#");
                columns.Bound(o => o.EventTitle).Title("Event-Title").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.Description).Title("Description").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(c => c.IsReminder).Title("Reminder").Width("3%").HtmlAttributes(new { @style = "font-size:x-small" }) .ClientTemplate("<input type='checkbox'> #= IsReminder ? checked='checked' : ''# disabled='disabled'></input>");
                columns.Bound(c => c.IsPrivate).Title("Private").Width("3%").HtmlAttributes(new { @style = "font-size:x-small" }) .ClientTemplate("<input type='checkbox' #= IsPrivate ? Checked='Checked' : ''# > </input>");
                columns.Bound(o => o.Category.CategoryName).Title("Event-Cust").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" }); //.ClientTemplate("#=Category.CategoryName#");

                //columns.Command(commands =>
                //{
                  //   commands.Edit();

                //}).Title("Commands").Width("10%").HtmlAttributes(new { @style = "font-size:x-small" });
            })
             //.Editable(editable => editable.Mode(GridEditMode.InLine))
            .DataSource(source => source
               .Ajax()
                 //.PageSize(3)
               .Model(model =>
               {
                   model.Id(m => m.EventId);

               })
                   .Read(read => read.Action("Fetch", "Events", new { area = "DashBoard"}))  //SKK: Id of employee can be passed here
               //.Read(read => read.Action("GetwithId", "Employees", new { area = "People", id = "#=PartyId#" }))  //SKK: Id of employee can be passed here
                // .Update(update => update.Action("UpdateDetail", "Employees", new { area = "People" , id = "#=PartyId#"}))
               //.Update(update => update.Action("Update", "Employees", new { area = "People" }))
           )
                //.Pageable()
           .Sortable()
           .ToClientTemplate()

       );

       items.Add().Text("Projects").HtmlAttributes(new { @style = "font-size:x-small" }).Content(obj =>
           Html.Kendo().Grid<ERPLiteModelsServices.Areas.Home.Models.ProjectModel>()
            .Name("grid3")
            .Columns(columns =>
            {
                columns.Bound(o => o.ProjectName).Title("Name").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.Description).Title("Description").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.StartDate).Title("StartDate").Width("8%").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.EndDate).Title("EndDate").Width("8%").Format("{0:dd/MM/yyyy}").HtmlAttributes(new { @style = "font-size:x-small" });
                columns.Bound(o => o.ProjManager.EmployeeName).Title("Projects-Manager").Width("8%").HtmlAttributes(new { @style = "font-size:x-small" });//.ClientTemplate("#=Customer.CustomerName#");
                                
                
                //columns.Command(commands =>
                //{
                  //   commands.Edit();

                //}).Title("Commands").Width("10%").HtmlAttributes(new { @style = "font-size:x-small" });
            })
             //.Editable(editable => editable.Mode(GridEditMode.InLine))
            .DataSource(source => source
               .Ajax()
                 //.PageSize(3)
               .Model(model =>
               {
                   model.Id(m => m.ProjectId);

               })
                   .Read(read => read.Action("Fetch", "Projects", new { area = "DashBoard"}))  //SKK: Id of employee can be passed here
               //.Read(read => read.Action("GetwithId", "Employees", new { area = "People", id = "#=PartyId#" }))  //SKK: Id of employee can be passed here
                // .Update(update => update.Action("UpdateDetail", "Employees", new { area = "People" , id = "#=PartyId#"}))
               //.Update(update => update.Action("Update", "Employees", new { area = "People" }))
           )
                //.Pageable()
           .Sortable()
           .ToClientTemplate()

       );



    })
    .ToClientTemplate()



    )
   
     


</script>
Dimiter Madjarov
Telerik team
 answered on 22 Oct 2014
1 answer
95 views
Hi,

I am currently developing an application with a tabstrip and I wanted to know if there is a way to navigate to a specific section on a page when I select a view.

For example I want to go to the section with id="bar" when I select the view foo.

I tried this but it didn't work : 


            <div data-role="tabstrip">
                <a href="views/home.html" data-icon="home">home</a> 
                <a href="views/foo.html#bar" data-icon="settings">foo</a>
            </div>

The real question is : Is there a way to have content that is visible only when I pull down the page ?
Petyo
Telerik team
 answered on 22 Oct 2014
1 answer
225 views
Hi,

it is possible I have a custom template editing with a grid? 
could give an example? 
Thank you.
Dimo
Telerik team
 answered on 22 Oct 2014
1 answer
121 views

When Grid supports Virtualization - and if we use the datasource.page(10) method - the 10th page data gets loaded and displayed but the scroll position does not change. And as soon as we try to scroll the page jumps back to 2nd or 3rd.

Is there a way to jump the scroll to a certain page during virtualization?
Nikolay Rusev
Telerik team
 answered on 22 Oct 2014
1 answer
185 views
I have a grid with parent and child rows, Grid is working fine and parent child rows are working as expected.
I show a image as column in row if there is a child row. Also the first column which is ">" on click of ">" child rows open as expected.

Issues
I want to add sort/group functionality to these 2 columns ( the image - which indicates if there is a child row and the column ">")
There are 2 issue
1) these 2 column header are not clickable
2) want to group all rows which has images ( images == child row available) and the followed by rows which has no child rows

Thanks and Regards

Nikolay Rusev
Telerik team
 answered on 22 Oct 2014
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?