Telerik Forums
Kendo UI for jQuery Forum
1 answer
115 views
The first image is a dragging node image. I dragged the 'furniture'
parent node inside the 'storage' parent node. This dragged
successfully(see second image).

I don't want to allow this to happen. How can I prevent it?

Thanks.
Alexander Popov
Telerik team
 answered on 24 Apr 2014
2 answers
364 views
Loading the page, all the user sees are the controls for the query criteria - some date ranges, some drop downs, some text boxes, some checkboxes, etc - and a big search button.  When they click on the search button, I create the Kendo grid and in the dataSource/transport/read, I get the criteria from the query criteria controls (in dataSource/transport/read/data) and send it to the server to get the grid of data.

Currently, whenever the user clicks on the search button, the same process is taking place, but that doesn't seem correct to me.  Should I be creating the grid each time?  Should I try to remove the grid from the DOM, if it exists, whenever I create the grid?  Why not just force a reload of the grid, and pull the data from the query criteria again?

What is the recommended Kendo practice for this?  Should I be calling $(selector).kendoGrid({...}); whenever the user clicks the search button?  If so, is there something I need to do to clean up the DOM before the call to kendoGrid if the grid already exists?

And does this apply to all Kendo widgets?

Thanks in advance.
Daniel
Telerik team
 answered on 24 Apr 2014
3 answers
199 views
If I filter data in a grid, and then go to clear that filter by simply clearing the filter string and clicking 'Filter', I would like to perform the same action as clicking 'Clear'. Is this at all possible? If so, how? TIA
David
Top achievements
Rank 1
 answered on 24 Apr 2014
5 answers
436 views
I have a grid with columns `start` and `end`. I have a template for the start column that shows the two integers concatenated as a range. E.g., "1 - 2". I put a custom editor on this templated column and want to be able to parse the range and set both start and end. Where should I perform this parsing logic? I tried to do it on the datasource change event but calling .set() on the dataitem ends up re-calling the event.
Daniel
Telerik team
 answered on 24 Apr 2014
3 answers
267 views
Hi guys,
Is it possible to use variables for titles in Grids.I am trying to do internationalization so that Title can come from DB / CMS system .

editable : "inline",
columns : [
{
field : "OrderID",
title : '$T_OO1', <--------instead of "Order ID"
filterable : true,
width : '20%'
},
Dimiter Madjarov
Telerik team
 answered on 24 Apr 2014
2 answers
619 views
This seems like a simple one but I am having issues finding a fix.  On window, I have 4 dropdowns and a grid.  A person can select from the dropdown and that will filter the grid.  Now that you have a filtered grid, you can then click on the grid column to filter at the column level.  The issue is that the dropdown list on the grid column filter does not reflect the filtered grid results.  Basically it is still the full potential list of choices instead of the reduced list since the grid was filtered.

So, how does one call a function to change the column filter datasource and
how do you get the now reduced datasource from the column?

Thanks.
Petur Subev
Telerik team
 answered on 24 Apr 2014
1 answer
97 views
I have a controller that returns an HttpResponseMessage.

public HttpResponseMessage Get()
{
    return GetByEnteredDate(Convert.ToDateTime("10/16/2013"));
}
 
public HttpResponseMessage GetByEnteredDate(DateTime enteredDate)
{
    return GetByEnteredDates(enteredDate.Date, enteredDate.Date.Add(new TimeSpan(23, 59, 0)));
}
 
public HttpResponseMessage GetByEnteredDates(DateTime fromDate, DateTime thruDate)
{
    var licenses =
        (from li in repository.All
         where !li.Deleted
         && li.DateEntered >= fromDate
         && li.DateEntered <= thruDate
         select li).ToList();
 
    if(licenses != null && licenses.Any())
    {
        return Request.CreateResponse<IEnumerable<LicenseDto>>(HttpStatusCode.OK,
            mapper.Map<IEnumerable<Hialeah.License.Domain.License>, IEnumerable<LicenseDto>>(licenses));
    }
 
    throw new HttpResponseException(HttpStatusCode.NotFound);
}

I then create a simple page and try to load a grid. For the life of me, I have not been able to make it work. I know the service returns data. But I can't even see the call in Google chrome. It just shows the grid with no data. I have tried many combinations in the schema. I place a break point on the Get() method and it doesn't get there. :-(

<div id="licensesGrid"></div>
 
<script type="text/javascript">
 
    $(document).ready(function () {
 
        var licenseDataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "api/licenses",
                    datatype: "json"
                }
            },
            schema: {
                data: function (response) {
                    return response.Data;
                }
            },
            pageSize: 10
        });
 
        $("#licensesGrid").kendoGrid({
            datasource: licenseDataSource,
            pageable: true,
            sortable: true
        });
 
    });
 
 
</script>

Thank you so much,
Carlos
Petur Subev
Telerik team
 answered on 24 Apr 2014
1 answer
545 views
Hi there,

I created a data bound date picker using the data-role attribute as follows: 

         <input id="startDatepicker" name="startDatepicker" class="datePicker" data-role="datepicker" data-bind="value: settings.startDate" data-format="yyyy-MM-dd" />

when I try to change the data-format to 'dd-MM-yyyy' the value wont show up, I think its because the default culture is en-US and therefore the date value becomes invalid. is there a way to specify the culture of the control to say en-NZ so that I can specify the format to dd/MM/yyyy correctly?

There are quite a few examples with setting date format as follows:

$("#datepicker").kendoDatePicker({
culture: "de-DE"
});

but does say how to do data binding if I am doing it this way

Any suggestions around either approach is greatly appreciated. 

Thanks
Paul 
Georgi Krustev
Telerik team
 answered on 24 Apr 2014
1 answer
571 views
Hi,

I have a grid with date column. If the date value is greater than 30 then i want to display the date value as is otherwise display the difference in days like "In x Days".

I able to display formatted date value or difference in days correctly using the below code.

div class="col-md-12" id="recurringPaymentList">
@(Html.Kendo().Grid<PaymentsModel>()
.Name("scheduledPayment")
.Columns(columns =>
{
columns.Bound(c => c.NextPaymentDate).ClientTemplate(
"#= ( Math.round((NextPaymentDate - new Date())/1000/60/60/24 ))>30 ? kendo.toString(NextPaymentDate, 'MM/dd/yyyy') : kendo.toString(Math.round((NextPaymentDate - new Date())/1000/60/60/24 )) #"
);

However, when i try to contenate string values (see code below) in the ternary expression grid data does not bind and i dont see any error.

columns.Bound(c => c.NextPaymentDate).ClientTemplate(
"#= ( Math.round((NextPaymentDate - new Date())/1000/60/60/24 ))>30 ? kendo.toString(NextPaymentDate, 'MM/dd/yyyy') : 'In ' + kendo.toString(Math.round((NextPaymentDate - new Date())/1000/60/60/24 ))  " ' Day' #"
);

Is there any way to get the string contenate work in ternary expression or any other way of doing this?
 

Dimiter Madjarov
Telerik team
 answered on 24 Apr 2014
1 answer
156 views
When I remove and then add a row in the Kendo grid, it increments the value by 1 instead of showing the same number of rows.

For eg, if I have only one row,

var dataSource1 = $("#grid").data("kendoGrid").dataSource;
a =dataSource1.data()[0];
dataSource1.remove(a)
alert("Total after removing a row : " + dataSource1.total()) // Now this is 0
dataSource1.add("Total after adding the same row" + a)
alert(dataSource1.total()) // Now this gives 2?!?!?!

But looking into the grid.dataSource.data().length gives the correct value of 1.
Due to this, the number of records present in the table shown in the table footer is displayed incorrectly.() It is shown as (1 - 2 of 2 records, instead of 1-1 of 1 record)

This also works for removing and adding multiple rows.
Rosen
Telerik team
 answered on 24 Apr 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
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
Iron
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
Iron
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?