Telerik Forums
Kendo UI for jQuery Forum
4 answers
476 views
Is there any way how to use Date picker for selecting two dates (from and to) ?

Usually there are couple ways how to achieve it (most popular see below):
- two text fields
- one date picker widget with possibility to select two dates (like google analytic has)
Sanjaya Kodagoda
Top achievements
Rank 1
 answered on 15 Nov 2013
4 answers
436 views
I have created a simple test to display a MySQL data table on a Kendo Grid using the DEMOS example as a template (ie, using a toolbar with Add/Edit/Cancel buttons, and having a Destroy command button in the grid).   I have defined my transport as:

transport: {
 read: {
                url: "services/user-read.php", 
                dataType: "JSON"
              },
              create: {
                url: "services/user-add.php", 
                type: "POST"
              },
              update: {
                url: "services/user-edit.php",
                type: "POST"
              } ,
 destroy: {
                url: "services/user-delete.php",
                type: "POST"
              }
},


During use, the Grid lets me Add / Edit and Delete records (and initially READS records just fine).   However, my Create/Update/Destroy PHP's never get called.   Is there something I have to manually do to get a Datasource to call these functions?   Any good examples of this available?

Thanks in advance!




Lito
Top achievements
Rank 1
 answered on 15 Nov 2013
1 answer
569 views
Hi,

 I have list of users (List<User>) binded to a grid. I have a currently logged in user information in ViewData[User]. 
What I want is if a grid contains a user which is in ViewData. I want that user to be selected as soon as grid loads data. How can I do this validation ? How can I get currently selected row ?


@(Html.Kendo().Grid<KendoGridAjaxBinding.Models.User>()
.Name("grid")
.DataSource(dataSource => dataSource  
.Ajax() // Specify that ajax binding is used
.Read(read => read.Action("User_Read", "Home")) // Set the action method which will return the data in JSON format
)
.Columns(columns =>
{
 
columns.Bound(user=> user.UserID); 
columns.Bound(user=> user.UserName); 
columns.Bound(user=> user.City);;
})
.Pageable() // Enable paging
.Sortable() // Enable sorting
)
Ignacio
Top achievements
Rank 1
 answered on 14 Nov 2013
8 answers
538 views
When I hover over the menu in iE9 it disappears.  It works fine with Chrome & IE8.  If I enable compatibility view in IE, when I hover over the menu, it doesn't disappear, however it will not expand on click.  Thoughts?

Edit:  I should add the file version of the DLL used is:  2012.2.710.340

@(Html.Kendo().Menu()
      .Name("menuUser")
      .OpenOnClick(true)
      .Items(items =>
      {
          items.Add().Text(User.Identity.Name)
               .Content(@<text>
               <table>
               <tr>
                <td style="vertical-align: top;"><img src="~/Images/icon_no_photo_no_border_60x60.png" alt="" /></td>
                <td>
                    <div class="header_sub_menu">
                        <h2>@ViewBag.AppContext.UserDisplayName</h2>
                        <h3>@ViewBag.AppContext.UserPrimaryEmail</h3>
                        <hr />
                        <ol>
                            <li>@Html.ActionLink("Settings", "Index", "Home", new { area = "Settings" }, null)</li>
                            <li>@Html.ActionLink("Log off", "LogOff", "Account", new { area = "" }, null)</li>
                        </ol>
                    </div>
                </td>
               </tr>
               </table>
               </text>);
      })
)
Max
Top achievements
Rank 1
 answered on 14 Nov 2013
1 answer
187 views
I'm working with a Date Column thats part of the Data Grid. I'm using the following filter for my DateClosed Column. The template display a button in the column cell if the DateClosed value = '01/01/0001' and the date closed value when its not equal to that '01/01/0001'.
My problem is I want to allow users to filter to only show the Closed or Not Closed records. Records. 
Using the ui: datepicker does not allow me to do this. 
please help
Grid....
 {
                           field: 'DateClosed',
                           title: 'Closed',
                           format: '{0:MM/dd/yyyy}',
                           filterable: {
                               extra: true,
                               ui: 'datepicker'
                           },
                           template: kendo.template($("#closeActionItem").html())
                       },
Alexander Valchev
Telerik team
 answered on 14 Nov 2013
8 answers
1.3K+ views
Hi,
I have this problem with kendo mobile.

  • I have a kendo observable object onto which I bind the change event. 
    accViewModel = kendo.observable({
        id: null,
        type: null,
        accountingKey: null,
        selectedItems : [],
        resultObj: []
    });

  • After some input fields, corresponding to selectedItems in observable have changed I do an AJAX request.
  • Then I update a nested objects inside the observable with .set() method
    accViewModel.set("resultObj", response.resultObj);
    accViewModel.set("selectedItems ", response.selectedItems);

  •  However after the updating the observable it no longer calls the change event handler when I edit input fields by hand (not using the set method) that are bound via MVVM in the HTML.
However, I can still trigger the change event by updating the fields with .set() method, however it calls the method twice. What could be happening here? Any ideas?
Alexander Valchev
Telerik team
 answered on 14 Nov 2013
1 answer
67 views
I observe that in IE 10, the grid height extends to the number of rows where as in IE 11, the grid height is equivalent to only one row and gets a vertical scrollbar automatically if the number of rows is more than one ! This looks really ugly and I don't want to specify height of grid explicitly - it must occupy the height size to be all rows included.
Iliana Dyankova
Telerik team
 answered on 14 Nov 2013
1 answer
199 views
Is there any way to tame KendoUI Grid to use a:visited {color: #4a637a;} sytle so that the hyperlink change the color after use clicks on them.
Currently I am able to add a:visited {color: #4a637a;}  for the grids in div tag where the grid is embedded but as soon as I refersh the grid or browser through the grid pages, the sytle is gone.

Any help is appreciated.
Alexander Valchev
Telerik team
 answered on 14 Nov 2013
1 answer
130 views
Hello !

i'm currently trying to use the template system with data binding from a json local file but i've got a preblem to make it work.

here is my json code which is into a data.json local file:

[
{ "Nom": "Test", "Pays": "FR", "Adresse1": "Rue du test", "CP": "59000" }
]
here is my javascript code

var dataSource = new kendo.data.DataSource({
    transport: {
        read: {
            url: "./data.json",
            dataType: "json"
        },
    }
});
 
$("#PointRelaisList").kendoMobileListView({
    dataSource: dataSource,
    template: $("#PointRelaisListTemplate").text()
});
here is my template

<script id="PointRelaisListTemplate" type="text/x-kendo-template">   
<span class="PointRelaisImage" style="background-image: url('http://www.mondialrelay.fr/img/dynamique/pr.aspx?id=#: Pays ##: kendo.toString(ID, '0000000') #')" ></span>
<div class="PR-Name">
#: Nom #
<span class="value">(0.2 km)
<a class="button" data-role="button" href="\#DetailPointRelais?Id=#: Pays ##: kendo.toString(ID, '0000000') #&Nom=#: Nom #" data-icon="info" style="font-size:10px;background-color:\#7184a2"></a>
<a class="button" data-role="button" data-context="#:ID#" data-click="setFavorite" data-icon="toprated" style="font-size:10px;background-color:\#7184a2"></a>
</span>
</div>
<div class="PR-Adress"> #: Adresse1 #
<br/> #: Pays # - #: CP #  #: Ville #
</div>
</script>
and here is the div where the html is added:

<div data-role="scroller" class="scroller-content" >
  <ul data-role="listview" data-style="inset" class="MRW-Results" id="PointRelaisList" data-template="PointRelaisListTemplate">
  </ul>
</div>
if someone could help me out to solve that problem ... ;)

thanks you ! :)
guillaume
Top achievements
Rank 1
 answered on 14 Nov 2013
1 answer
167 views
I'm having some issues with tooltips & seriesClick on my chart.  Here is a jsFiddle demonstrating the issue.

In chart 1, there is no issue getting the tooltip data, but in chart 2, I am getting 'undefined' for some of the data I want to display (both chart 1 and chart 2 are using a template to format the tooltip data).  In addition on chart 2, if you click on a column chart series, I am also getting 'undefined' for some data.

FYI, I am using v2013.2.918

Thanks in advance,
--Ed
Iliana Dyankova
Telerik team
 answered on 14 Nov 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
Drag and Drop
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?