Telerik Forums
Kendo UI for jQuery Forum
6 answers
497 views

Hi there,

I have an issue with the stock browser on the Samsung tab 10.1 whereby the device renders what looks to be a native textview over the html input tag when it receives focus. When receiving focus the popover and modalviews both close immediately. The popop or modalview do not close when not using the splitview.

See these videos.

Working without splitview
http://sdrv.ms/13i1Blz

Closing immediately with splitview
http://sdrv.ms/13i1CpE

I am using the modalview index.html directly from your samples. With the splitview/modalview page, I have dropped the Modalview code into the splitview index.html. See attached

I do not experience this problem on the google nexus 7 tablet using chrome.

Side Note: Would you happen to know whether I can disable this rendering behaviour on this Samsung device? I have noticed other Samsung specific UX behaviour in the browser, in particular drop down select lists draw completely different, so turning this off would be ideal. 

Given its only happening via the splitview, i suspect it could be fixed/addressed by your product, if not, are you able to provide an explanation as to what order of focus/hide events could be happening on this tablet that makes the browser behave like it is which I can then pass onto a ticket with Samsung. 

Thanks.
Kee
Top achievements
Rank 1
 answered on 16 Jan 2013
1 answer
307 views
Please help me out in doing server side pagination using kendo grid
Below is my index.cshtml

@using Kendo.Mvc.UI
<script src="../../js/jquery-1.8.3.min.js" type="text/javascript"></script>
@*<script src="../../js/jquery-1.7.1.min.js" type="text/javascript"></script>*@
@*<script src="../../js/jquery.min.js" type="text/javascript"></script>*@
<link href="../../styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
<script src="../../js/kendo.all.min.js" type="text/javascript"></script>
<link href="../../styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<script src="../../js/kendo.aspnetmvc.min.js" type="text/javascript"></script>




@model IEnumerable<KendoGrid.Controllers.Product>

@(Html.Kendo().Grid(Model)    
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.ID).Groupable(false);
        columns.Bound(p => p.Name);
        columns.Bound(p => p.Address);
        columns.Command(command => command.Destroy()).Width(110);
    })
    
    .ToolBar(toolbar => {
        toolbar.Create();
        toolbar.Save();                
    })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
            
    .Sortable(sortable => sortable.SortMode(GridSortMode.MultipleColumn))
    .Scrollable()
    .Navigatable()
    .Filterable()
    .Pageable()
    .Groupable()
        .Resizable(resize => resize.Columns(true))
        .Reorderable(reorder => reorder.Columns(true))
    .Selectable()  
         
    .DataSource(dataSource => dataSource       
        .Ajax()         
        .Batch(true)        
        .ServerOperation(true)        
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.ID))
        .Create("Editing_Create", "Home")
        .Read("Editing_Read", "Home")                    
        .Update("Editing_Update", "Home")
        .Destroy("Editing_Destroy", "Home")
       
       
    )
   
    )

And below is my HomeController.cs

using System.Collections.Generic;
using System.Web.Mvc;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using System;
using System.Linq;
using System.Web;

namespace KendoGrid.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            //return View(GetProducts());
            return View();
        }

        public ActionResult Remote_Data()
        {
            return View("AjaxBinding");
        }

        //public ActionResult Products_Read([DataSourceRequest] DataSourceRequest request)
        //{
        //    return Json(GetProducts().ToDataSourceResult(request));
        //}



        public ActionResult Editing()
        {
            return View();
        }

        public ActionResult Editing_Read([DataSourceRequest] DataSourceRequest request)
        {
            

            return Json(SessionProductRepository.All().ToDataSourceResult(request));
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Editing_Create([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Product> products)
        {
            var results = new List<Product>();

            if (products != null && ModelState.IsValid)
            {
                foreach (var product in products)
                {
                    SessionProductRepository.Insert(product);
                    results.Add(product);
                }
            }

            return Json(results.ToDataSourceResult(request, ModelState));
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Editing_Update([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Product> products)
        {
            if (products != null && ModelState.IsValid)
            {
                foreach (var product in products)
                {
                    var target = SessionProductRepository.One(p => p.ID == product.ID);
                    if (target != null)
                    {
                        target.Name = product.Name;
                        target.Address = product.Address;
                        SessionProductRepository.Update(target);
                    }
                }
            }

            return Json(ModelState.ToDataSourceResult());
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Editing_Destroy([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Product> products)
        {
            if (products.Any())
            {
                foreach (var product in products)
                {
                    SessionProductRepository.Delete(product);
                }
            }

            return Json(ModelState.ToDataSourceResult());
        }

        public ActionResult Products(int pageSize, int skip)
        {
            var products = SessionProductRepository.All();

            // Get the total number of records - needed for paging
            var total = products.Count();

            // Page the data
            var data = products.Skip(skip).Take(pageSize).ToList();

            // Return as JSON - the Kendo Grid will use the response
            return Json(new { total = total, data = data });
        }



        //private static IEnumerable<Product> GetProducts()
        //{
        //    List<Product> products = new System.Collections.Generic.List<Product>();

        //    products.Add(new Product { ID = 1, Name = "Test-1", Address = "Address-1" });
        //    products.Add(new Product { ID = 2, Name = "Test-2", Address = "Address-2" });
        //    products.Add(new Product { ID = 3, Name = "Test-3", Address = "Address-3" });
        //    products.Add(new Product { ID = 4, Name = "Test-4", Address = "Address-4" });

        //    return products;
        //}

    }






    public class Product 
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
    }

    public static class SessionProductRepository
    {
        public static IList<Product> All()
        {
            IList<Product> result = (IList<Product>)HttpContext.Current.Session["Products"];

            if (result == null)
            {
                
            List<Product> products = new System.Collections.Generic.List<Product>();

            products.Add(new Product { ID = 1, Name = "Test-1", Address = "Address-1" });
            products.Add(new Product { ID = 2, Name = "Test-2", Address = "Address-2" });
            products.Add(new Product { ID = 3, Name = "Test-3", Address = "Address-3" });
            products.Add(new Product { ID = 4, Name = "Test-4", Address = "Address-4" });

            products.Add(new Product { ID = 5, Name = "Test-5", Address = "Address-5" });
            products.Add(new Product { ID = 6, Name = "Test-6", Address = "Address-6" });
            products.Add(new Product { ID = 7, Name = "Test-7", Address = "Address-7" });
            products.Add(new Product { ID = 8, Name = "Test-8", Address = "Address-8" });
            products.Add(new Product { ID = 9, Name = "Test-9", Address = "Address-9" });
            products.Add(new Product { ID = 10, Name = "Test-10", Address = "Address-10" });
            products.Add(new Product { ID = 11, Name = "Test-11", Address = "Address-11" });
            products.Add(new Product { ID = 12, Name = "Test-12", Address = "Address-12" });
            products.Add(new Product { ID = 13, Name = "Test-13", Address = "Address-13" });

            HttpContext.Current.Session["Products"] = result = products;
            }

            return result;
        }

        public static Product One(Func<Product, bool> predicate)
        {
            return All().Where(predicate).FirstOrDefault();
        }

        public static void Insert(Product product)
        {
            product.ID = All().OrderByDescending(p => p.ID).First().ID + 1;

            All().Insert(0, product);
        }

        public static void Update(Product product)
        {
            Product target = One(p => p.ID == product.ID);
            if (target != null)
            {
                target.Name = product.Name;
                target.Address = product.Address;
            }
        }

        public static void Delete(Product product)
        {
            Product target = One(p => p.ID == product.ID);
            if (target != null)
            {
                All().Remove(target);
            }
        }
    }

}








Alexander Valchev
Telerik team
 answered on 16 Jan 2013
8 answers
1.4K+ views
Hi,

I need a "ComboBox" to look and behave similar to "Autocomplete". I need "dataValueField" and "dataTextField" so I have to use "ComboBox" control. My "ComboBox" is using REST JSON service that filters the data, but the service is called only the first time.

$("#combobox").kendoComboBox({
   dataTextField: "Name",
   dataValueField: "ID",
   dataSource: {
      type: "json",
      transport: {
         read: {
            url: "...",
            contentType: "application/json;",
            dataType: "json",
            data: {
               name: function () {
return $("#combobox").val();
}
            }
}
}
}
});

I believe I have to use "change" event of "ComboBox", but I am not sure if this is the right pattern.

I would appreciate help. Thanks.

Igor
Ruud
Top achievements
Rank 1
 answered on 16 Jan 2013
2 answers
889 views
Hi,

If I stop dragging an element outside of the drop target it 'flies' back to the original position.  Is there any way to prevent this?  Ideally, I'd like it to be able to just fade it out and have the original fade back in.  Any help would be appreciated on achieving this please?
Chris
Top achievements
Rank 1
 answered on 16 Jan 2013
1 answer
592 views
How can I scroll a data item into view? (Even if it is on a different page).
Alexander Valchev
Telerik team
 answered on 16 Jan 2013
1 answer
1.2K+ views
Hello,

i've searchd for a way to add new items to a exsisitng ListView without reading the DataSoucre again.

I want to add one or more complete filled items to the exisiting ListView that have a DataSource the question is how should i do that?

Sample-Code:
var objectListDataSource = new kendo.data.DataSource( {
               transport: {
                   read: function ( options ) {
                       $.ajax( {
                           url: '/default/GetUsers',
                           type: 'POST',
                           dataType: 'json',
                           data: { ids: ids },
                           traditional: true,
                           success: function ( data ) {
                               options.success( data );
                           }
                       } );
                   }
               },
               schema: {
                   data: 'items',
                   model: {
                       id: 'ID',
                       fields: {
                           ID: { type: "Number", editable: false, nullable: false, validation: { required: false} },
                           UserName: "UserName"
                       }
                   }
               }
           } );
 
           $( '#objectList' ).kendoListView( {
               dataSource: objectListDataSource,
               template: '<li>${ DisplayName }<div class="separator">|</div></li>',
               selectable: 'single',
               change: function () {
                   //alert( "CHANGE" );
               },
               dataBound: function () {
                   //alert( "dataBound" );
               }
           } );
If i use after the initialisation of the ListView the follwoing Code it will work but i need a way to add these items withoud rebinding the DataSource.

var myDS = $( '#objectList' ).data( "kendoListView" ).dataSource;
ids.push( 50 );
ids.push( 45 );
myDS .read();

Your help would be very welcome!
Iliana Dyankova
Telerik team
 answered on 16 Jan 2013
1 answer
162 views
I'm not sure if this is bug or I'm doing something wrong. But I have a grid with a custom template. There are data-bind:click bindings inside the template. I also have a dropdownlist on the same page that is bound to that same datasource. When the dropdownlist is bound, the click bindings inside the grid row template don't work and give an error:
 TypeError: Object [object Object] has no method 'apply'
Once i remove the binding from the dropdownlist it works. Everything else seems to be fine with the dropdownlist.



Alexander Valchev
Telerik team
 answered on 16 Jan 2013
3 answers
577 views
Hi,
Can i enable/disable checkbox of an item from a parametrer passed in the datasource?

for example:
i set my treeview with: 
checkboxes: {
                    checkChildren: true
                },
in the:
   dataSource: [{ ... }]

can i pass a parametrer for set the checkbox disable on that item? (or i can do not show a checkbox for that item)

thank you




Alex Gyoshev
Telerik team
 answered on 16 Jan 2013
2 answers
916 views
Hi,
i have create a datetimepicker, i put depth: year
i want that when i select the month in the value appear the last day of the selected month and not the first day..

i select Jan   value: 01/01/2013  so i want that when i select a month in the value there is  31/01/2013  <- so the last day.

somebody know how to do?

Thank you
Francesco
Top achievements
Rank 1
 answered on 16 Jan 2013
2 answers
313 views
i have inline editing grid with datepicker. This is working fine if i use local database(PC database) but not working if i use remote database


shared/editortemplate/DateTime.cshtml

@model DateTime?


@(Html.Kendo().DatePickerFor(m => m).Format("M/dd/yyyy"))



View:
columns.Bound(p => p.DateCompleted).Format("{0:d}").Width(80)       

Model:
 [UIHint("Date")]
 [DisplayName("Date Completed")]
 public DateTime? DateCompleted { get; set; }
when i tried to update and pick another date the tried to save, the date value become null and it weird is only happen if i connect via remote database



please advise
Vladimir Iliev
Telerik team
 answered on 16 Jan 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
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?