Telerik Forums
Kendo UI for jQuery Forum
1 answer
116 views
Hello all,

I am working with the very latest kendo release 2013.2.716 and MVC 4 with VS 2012.

 I have a kendo grid and it was decided to remove the buttons for displaying details and achieve this via row click. Easy enough right?

If I have an edit and delete button however, for each row in addition to the row click to show details, how do I exclude the edit and delete buttons from calling the row click instead of the edit or delete functionality? 

Any help is appreciated.
$("#grid tbody").on("click", "tr", showError);
showError.call($("grid tbody tr:first"));
 
   function showError() {
 
          if (documentReady) {
               
              var $this = $(this),
              dataItem = $this.data();
              var id = GetId(dataItem);
              if (id != 0) {                 
                  window.location.href = "/Error/ShowError/" + id;
              }
          }          
   }
   function GetId(item) {
       var items = grid.dataSource.data();
       for (var i = 0; i < items.length; i++) {
           var e = items[i];
           if (e.uid == item.uid) {
               return e.ExceptionLogId;
           }           
       }
       return 0;
   }


Paul

Paul
Top achievements
Rank 1
 answered on 01 Aug 2013
1 answer
146 views
In Kendo StockChart(http://demos.kendoui.com/dataviz/financial/index.html), have observed that dragging the navigator in bottom chart doesn't work always as expected. When I want to narrow down the navigator range,by pulling in either right handle/left handle, instead of narrowing down it moves the navigator range.

Looking at mousemove event handler in this case,shows that it decides whether to drag/narrow down the range,based on target element.
So, in some cases though i start dragging the mouse with pointer on left handle, but mousemove event listener gets the target as selection between leftHandle and rightHandle.

Looks in this case, the cursor width (cursor type e-reisze) is more than handle width and that's causing the issue.

Is there any other better way to handle this scenario that works always?

Also, have seen in some toolkits (nvd3), SVG is used for right/left handle that works very smooth instead of HTML controls. Is there any reason for not using SVG for right/left handle in KendoUI?
T. Tsonev
Telerik team
 answered on 01 Aug 2013
3 answers
228 views
Hi

I'm trying to reproduce the custom editing sample with dropdownlist inside the gridcell.
For some reason, the combo is not created...

I'm attaching the project to this message.

Do I miss any script for the project?

Thank you in advance,
Shabtai
Vladimir Iliev
Telerik team
 answered on 01 Aug 2013
1 answer
209 views
Hello,
I'm going further in my KendoUI discovery... I wish to have a DropDownList while editing a cell on a certain column

my grid is :

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <%: Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(x => x.IDUtente);
        columns.Bound(x => x.Nominativo);
        columns.Bound(x => x.Societa);
        columns.Bound(x => x.Filiale);
        columns.Bound(x => x.Ruolo);
        columns.Bound(x => x.IDStato).Hidden();
        columns.Bound(x => x.Stato).ClientTemplate("StatoID");
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Groupable()
   // .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax().Model(model => model.Id(p => p.IDUtente))
        .ServerOperation(false)
        .Read(read => read.Action("GetListaUtenti", "Administration")
        )
    )
%>
</asp:Content>

and I've created an ascx called StatoID with

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<int>" %>

<%:@(Html.Kendo().DropDownListFor(m => m).BindTo(new List<SelectListItem>() {
              new SelectListItem() {
                  Text = "Enabled",
                  Value = "1"
              },
              new SelectListItem() {
                  Text = "Disabled",
                  Value = "0"
              }
       
          }).Value(1)
%>

I don't understand where I say to the Grid when in edit use that template...I've downloaded http://www.kendoui.com/code-library/mvc/grid/grid-inline-and-popup-editing-using-cascading-dropdownlists.aspx but it's razor and I'm using ASPX ... anyone can help me?

I wish those data to be loaded from the Controller

I've just got a method (first it would just be enougth to load statically),later my method will be

  [HttpPost]
        public ActionResult GetStati([DataSourceRequest] DataSourceRequest request, int idUser)
        {
            DataAccessAdministration da = new DataAccessAdministration(Global.IDApplication, IDIstituto);

            var res = da.GetStati(idUser);
            return Json(res.ToDataSourceResult(request));
        }

Please help me thanks!
Vladimir Iliev
Telerik team
 answered on 01 Aug 2013
3 answers
123 views
Hello,
Im getting a problem that i can't resolve.

So i have a grid, and in one of the field i have a dropdownlist (filled with an other Datasource)

When i select a data in the dropdownlist it works except when i create a new line, when i select  a data in the dropdownlist, i got in the grid [object Object] 

I'm asking how to put in the grid the data i selected in the dropdownlist (SellToName).

here is my code
DataSource:
var customers = [
          {NUMBER:"P001",SellToName:"test1"},
                {NUMBER:"U001",SellToName:"test2"}
]
 var businessList = [
         { NUMBER: "A5678", SellToCustomerNumber: "NOV" }
]
Grid and DropdownList
$(document).ready(function () {
                
                
                   //chargement customer list format json
                   var customerDataSource = new kendo.data.DataSource({
                        data: customers
                   });
                        
                   //chargement business list format json
                   var businessListDataSource = new kendo.data.DataSource({
                        data: businessList
                   });
                        
                   //on initialise la grid
                   $("#grid").kendoGrid({
                       dataSource: businessListDataSource,
                       pageable: true,
                       navigatable: true,
                       groupable: true,
                       sortable: true,
                       height: 700,
                       toolbar: ["create"],
                       columns: [
                           { field:"NUMBER",title:"Numero"},
                           { field: "SellToName", title: "Nom", editor: numberDropDownEditor },
                           { command: "destroy", title: " ", width: "90px"}],
                       editable: true
                   });
                    
            
                   function numberDropDownEditor(container, options) {
                       $('<input  required="required" data-text-field="SellToName" data-value-field="SellToName" data-bind="value:' + options.field + '"/>')
                       .appendTo(container)
                       .kendoDropDownList({
                           autoBind: false,
                           dataSource: customerDataSource
                       }
                       );
                   }
                    
               });
Thank you.


Kiril Nikolov
Telerik team
 answered on 01 Aug 2013
1 answer
56 views
input#autocomplete

var tagTab=["oranges"];

$("#autocomplete").kendoAutoComplete({

    dataSource: tagTab, 
    dataBound: function(e) {
         var dataSource = new kendo.data.DataSource({
                 data: [ "bananas", "cherries" ]
         });
         var autocomplete = $("#autocomplete").data("kendoAutoComplete");
         autocomplete.setDataSource(dataSource);
   }
});

This is my code, in fact as you can see here when the user start to write something, the tags will change from "oranges" to "bananas" and "cherries".
Actually it's a simple exemple, the goal will be to change the tags in function of the imput text...

Anyway, when you start to write "ba",  the autoComplete opens correctly, the tag is"bananas" like expected...

My problem is:  When I select the tag (with arrow keys or mouse)  then I press enter (or click), just nothing append in the imput text field, the autoComplete just close.

If someone could help me please, would be awesome ! 
Kelly
Top achievements
Rank 1
 answered on 01 Aug 2013
0 answers
99 views
hello,
I need to design an Building chart . I fetch data from service and that save in native database. now I design to  tree view structure . such as below
ProjectName
       BuildingA
               Wing 1
                    Floor 1
                          Activity1
                                Item1
                                Item2
                         Activity2
                    Floor2
                           Activity1
                                Item1
                                Item2
                         Activity2
                Wing 2
                Wing 3
         Building2
         Building3
 
Rupali
Top achievements
Rank 1
 asked on 01 Aug 2013
0 answers
160 views
Figured out how to use it. Question is void.
ruud
Top achievements
Rank 1
 asked on 01 Aug 2013
1 answer
91 views
I have data for 11 month, date 02/26/2012, 03/25/2012,
04/26/2012….. 12/30/2012.

I want to show those dates on Axis labels.  

.CategoryAxis(axis => axis

                                  

                                   
.Categories(e=>e.Date)

                                    .Date()

                                    .BaseUnit(ChartAxisBaseUnit.Months)

                                   
.Labels(labels => labels

                                                         
.Rotation(-80)

                                                 
        .Format("MM/dd/yyyy")

                                    )

This code will show first date of the month. 02/01/2012,
03/01/2012 and so on. It doesn’t show the accrual date . If I remove Date and
baseUnit it will show each week. Can you tell me how to accomplish this.

 

Thanks

 
Iliana Dyankova
Telerik team
 answered on 01 Aug 2013
1 answer
171 views
I have been trying to find some help in various places for an issue that I'm having with a tabstrip and grid.

What I'm trying to do
What I'm trying to do is use a server bound grid that uses templates for 2 of its rows inside of a tab strip that I would like to get loaded using "LoadContentFrom" to take advantage of on demand loading. In addition to that, I need to implement sorting on the grid.

What I've already tried
I have tried numerous ways to make this happen but have not had any success. To temporarily solve this problem, I am using the "Content" function to load the data in my tab strips. The down side of this is that all the data in all my tab strips gets loaded on page load. This causes the page to load slower and each time I click on a column header to sort, the page refreshes.

Summary question
So my question is, is it possible to have a tab strip that uses the "LoadContentFrom" method and have a server bound grid within one of the tab strips that can sort?  If it is possible, can someone give me an example of what that would look like?

My development environment
I am work on an MVC 4 based project. I am using VB.NET as my programming language. I am fine with someone providing an answer using C#.

What my code looks like now
Below is an example of the code that I have now.

Tab strip code
@Imports CommericalPortal.BusinessData.Entities
@Imports CommericalPortal.Web.Models.Entities
@imports CommericalPortal.Web.My.Resources
@ModelType Customer

@Code
    ViewBag.Settings.PageTitle = Model.OperatingName

    Dim lastSavedTabIndex As Integer
    If Request.Cookies("TabCustomersPolicySavedIndex") IsNot Nothing AndAlso IsNumeric(Request.Cookies "TabCustomersPolicySavedIndex").Value) Then
        lastSavedTabIndex = CInt(Request.Cookies("TabCustomersPolicySavedIndex").Value)
    Else
        lastSavedTabIndex = 1
    End If
End Code

@(Html.Kendo().TabStrip().Name("TabCustomers").SelectedIndex(lastSavedTabIndex) _
    .Items(Sub(actions)
                   actions.Add().Text(TabText.ContactInfoTab).Content(Html.Action("ByLocation", "Contacts", New With {.asPartial = True}).ToHtmlString)
                   actions.Add().Text(TabText.PoliciesTab).Content(Html.Action("ByLocation", "Policies", New With {.asPartial = True}).ToHtmlString)
                   actions.Add().Text(TabText.InvoicesTab).Content(Html.Action("ByLocation", "Invoices", New With {.asPartial = True}).ToHtmlString)
                   actions.Add().Text(TabText.ClaimsTab).Content(Html.Action("ByLocation", "Claims", New With {.asPartial = True}).ToHtmlString)
                   actions.Add().Text(TabText.BillingTab).Content(Html.Action("ForCustomer", "Billing", New With {.asPartial = True}).ToHtmlString)
           End Sub) _
    .Events(Sub(x)
                   x.Select("onSelect")
            End Sub)
    )

<script>
    function onSelect(e) {
        SetupTabStripToRememberActiveTabBetweenPageCalls
("TabCustomers", "TabCustomersPolicySavedIndex");
    }
</script>


Tab strip contents code (grid)
@ModelType ilist(of CommericalPortal.BusinessData.Entities.PACInformation)'
@imports CommericalPortal.Web

@(Html.Kendo.Grid(Model).Name("DisplayPAC") _
    .Columns(Sub(columns)
                 columns.Bound(Function(model) model.AccountNumber).Title(CommericalPortal.BusinessData.Resources.BillingAndInvoices.PacAccountNumberLabel_ShortForm).Sortable(False)
                 columns.Bound(Function(model) model.BankNumber).Title(CommericalPortal.BusinessData.Resources.BillingAndInvoices.PacBankNumberLabel_ShortForm)
                 columns.Bound(Function(model) model.TransitNumber).Title(CommericalPortal.BusinessData.Resources.BillingAndInvoices.PacTransitNumberLabel_ShortForm)
                 columns.Bound(Function(model) model).Template(Function(obj) String.Format("<a href='{0}/{1}'>{2}</a>", Url.Content("~/PAC/Edit"), obj.ID, CommericalPortal.Web.My.Resources.GridText.EditLinkText)).Title("")
                 columns.Bound(Function(model) model).Template(Function(obj) String.Format("<a  href='{0}/{1}'>{2}</a>", Url.Content("~/PAC/ViewCheques"), obj.ID, CommericalPortal.Web.My.Resources.GridText.ViewChequesLinkText)).Title("")
         End Sub) _
    .Sortable(Function(sorting) sorting.SortMode(GridSortMode.SingleColumn).Enabled(True))
)

Vladimir Iliev
Telerik team
 answered on 01 Aug 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?