Telerik Forums
Kendo UI for jQuery Forum
7 answers
422 views
I have a grid, with filtering enabled, and the dropdown list for the filters is being loaded from a datasource on the server.

column.Bound(o => o.Color).Title("Color").Filterable(filterable => filterable.UI("colorFilter"));
function colorFilter(element) {
element.kendoDropDownList({
     dataSource: {
     transport: {
     read: "@Url.RouteUrl("ProductData", new { action = "FilterMenuCustomization_Colors", controller = "Inventory", catagory = "XYZ" })"
     , type: "POST"
     , data: { catagory: "@ViewData["productType"].ToString()", filters: $("#Products").data.filter }
     }
     },
     optionLabel: "--Select Value--"
});
    }

This works just fine. I actually have 3 columns just like the one above for different values. My question is, how do I programatically re-bind these drop downs once the grid gets rebound? What Im trying to accomplish is if I change one of the filters, I would like the other filters to be changed as well based on the selected filter. Like cascading drop-downs, but they are all mutually exclusive. Its not a direct hierarchy.

So If I can get the drop-downs to rebind (each time the grid data gets bound), I can send the current filtered parameters with it, and change the response options based on that. I hope this makes sense.
Rosen
Telerik team
 answered on 31 Jan 2013
7 answers
535 views
Hi

My question has a litttle backgound.
I have developed an application which allows me to select a customer.
After selecting the customer a kendo bar Chart is generated, and filled with the turnover of the last 12 months.
The data are collected by calling a json webservice.
This all works fine, and the webservice call is fired only once.

Now I load the application as partial view in an mvc view.
It is loaded into a kendoWindow.

All of a sudden the application now fires the webservice call twice.

I have put breakpoints in the controller, in the view and in the partial view, and after selecting the customer, all breakpoints are visited only once.
This should mean that the partial view is loaded once, and the webservice is also called once.

But why is the webservice called twice?
Fiddler shows two calls, and also the logs on the json webservice records two calls.

Has anyone had such an experience?

Could it be that after selecting the customer, the active window is already generating the call to the webservice, but that the underlying view is generating a second window which is also calling the webservice?

Many thanks for your help!

Henk Jelt


Jason
Top achievements
Rank 1
 answered on 30 Jan 2013
2 answers
139 views
Hi.  I'm pretty new to the Kendo controls so hopefully I'm just missing something obvious here.

First question: How do I apply a descending sort by default on a grid?  Here's my current grid definition but the sort (by date_time) is ascending rather than descending:

@(Html.Kendo().Grid<DSG.Support.EntityModel.Models.SolutionFeedback>()
    .Name("KBFeedbackGrid")
    .Columns(columns =>
    {
        columns.Bound("solution_id").Title("KB#");
        columns.Command(act => act.Custom("Edit"));
        columns.Bound("site_id").Title("Acc ID");
        columns.Bound("site_name").Title("Account Name");
        columns.Bound("rating_score").Title("Rating").HtmlAttributes(new { @class = "ratingCol" });
        columns.Bound("date_time").Title("Created").Format("{0:MM/dd/yyyy HH:mm}");
        columns.Bound("comments").Title("Comment");
        columns.Bound("action_taken").Title("Action");
    })
    .DataSource(dataSource => dataSource.Ajax()
        .Read(read => read.Action("Query", "KBFeedback").Data("GetSearchCriteria"))
        .Sort(sort => sort.Add(x => x.date_time))
        )
    .Pageable()
    .Sortable(sort => sort.AllowUnsort(false).Enabled(true).SortMode(GridSortMode.SingleColumn))
)
I
Second question:  The sort option doesn't seem to be reaching the MVC action.

public JsonResult Query(DataSourceRequest request, KBFeedbackSearchCriteria query)
{
    // Here request contains the page number and page size but the Sorts collection is null
 
    int count = 42; // Get count from linq query
    IEnumerable<SolutionFeedback> results = null; // Get data from linq query
 
    return Json(new DataSourceResult() { Data = results, Total = count }, JsonRequestBehavior.AllowGet);
}
If I look at the form or add a "sort" string param to the Query function I can see the sort information being passed (e.g. "site_name-asc") but it isn't being pulled into the request object.

From another thread I found I saw a recommendation to make sure kendo.aspnetmvc.min.js is included but I checked and it is.

@Scripts.Render("~/bundles/modernizr")
<!--This bundle was moved by the Kendo UI VS Extensions for compatibility reasons-->
@Scripts.Render("~/bundles/jquery")
<!--This CSS entry was added by the Kendo UI VS Extensions for compatibility reasons-->
<link href="@Url.Content("~/Content/kendo.compatibility.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2012.3.1315/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2012.3.1315/jquery.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2012.3.1315/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2012.3.1315/kendo.aspnetmvc.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
What else should I check?
Douglas
Top achievements
Rank 1
 answered on 30 Jan 2013
15 answers
737 views
Hi,

I'm a commercial complete client and have a simple but very strange problem.
 
I am using a kendo grid in a GoldMine (a windows based CMS) project and have one issue that needs to be resolved. I'm sure it has to do with the stripped down version of IE that Goldmine uses in it's GM+view tab. The GM+view tab is simply an embedded IE browser that exposes the contact data so that external web apps can be integrated.

Here's the problem. When the user clicks on the column header name of a sortble column a new browser window is opened with an empty grid. I'm using the column menu so I don't need the column header to be a link for sorting the column. This only happens in the Goldmine app so I know this is special, but it's a deal breaker for me because this is one of my apps that I'd like to integrate and there is a substantial user base at stake.

So, can the sorting link be disabled for column headers while still maintaining the ability to sort using the column menu? I'm sure there is a way to modify the JS but I'm not able to find it. Unfortunately there is no project I can send to show the problem but I can easily setup a GoToMeeting session and screen share to demo the issue.

My hope is that there's a simple fix for this. I think the IE version is 9 but I'm not sure what the embedded version is like.

Thanks in advance
Tony
Top achievements
Rank 1
 answered on 30 Jan 2013
1 answer
321 views
Hey everbody,

I've got the unique problem of determining an easy-to-understand, concise way to allow our users to edit a value for one or more columns across multiple selected rows.

I've heard from project stakeholders that they particularly like the approach which mint.com takes in allowing for multiple row edits.  This is a slide-out from beneath the header which mimics the row style of the given grid.  In place of column values, there are controls for editing, which then copy values to the selected columns and submit the edits.

I've seen the technical portion of this work in the grid control, however I haven't seen anything remotely like the presentation portion.  I took a stab at getting a simple plugin to overlay the grid, but kept getting interesting bounding issues in trying to determine where the columns actually began and ended, leading to the pseudo-columns we were creating to display far out of whack with where the actual columns displayed.

Does Kendo have any support for multiple editing beyond batch editing (more of a select once - publish many pattern)?  Or is there support for real-time monitoring of the offset of cell bounds and table width?  Or in order to accomplish this, will I have to hack together some Javascript to get things displaying in the right location?

Any ideas on what the best way to accomplish this with the control would be appreciated.

Thanks!
Josh
Alexander Valchev
Telerik team
 answered on 30 Jan 2013
4 answers
510 views
I have a web api for address loopup. User can type some keywords and system will search both Location Description and Address.

I managed to write the following code to make it work, well, basically.

So, whenever user types anything, application will go to server to get back results properly.
However, since I need to specify dataTextField as LocationDescription, autocomplete will always filter out results if keyword is in Address field.

Default value of filter is startsWith, I've changed it to "contains" in my code.

My question is, is there any way I can just disable client side filtering based on dataTextField?

TIA

===============
<input id="pulocation" />

<script id="template" type="text/x-kendo-tmpl">
     <b>${ data.LocationDescription }</b><br/>
     ${ data.Address } 
</script>

<script type="text/javascript">
    $(document).ready(function () {
        var myDs = new kendo.data.DataSource({
            transport: {
                read: function (options) {
                    $.ajax({
                        url: "/api/AddressLookup",
                        data: {
                            criteria: function () {
                                return $("#pulocation").val();
                            }
                        },
                        success: function (result) {
                            options.success(result);
                        },
                        dataType: "json",
                        beforeSend: function (xhr) {
   // set auth info
                        }
                    });
                }
            }
        });

        $("#pulocation").kendoAutoComplete({
            minLength: 1,
            dataTextField: "LocationDescription",
            template: kendo.template($("#template").html()),
            filter: "contains", // <--
            dataSource: myDs
        });

        $("#pulocation").data("kendoAutoComplete").list.width(400);

        $("#pulocation").keydown(function (e) {
                myDs.read();    
        });
    });
</script>

Kent
Top achievements
Rank 1
 answered on 30 Jan 2013
1 answer
234 views
While trying to tackle the following issue regarding the splitter, I am left wondering if it is possible to hook into the splitter's splitter bar drag events.....



Original Issue:

http://www.kendoui.com/forums/ui/splitter/splitter-over-an-iframe-is-not-sensed.aspx



I am trying like this: (working for #testButton and .t-pane, but not .t-splitbar.....)

$('#testButton, .t-splitbar, .t-pane').kendoDraggable({
                       dragstart: function(e) { 
                           alert('hello');
                       }
                   });

Is there a way to do this?  (My intention will be to hook into dragStart, raise the invisible window, hook into dragEnd, hide the invisible window)

Dimo
Telerik team
 answered on 30 Jan 2013
2 answers
158 views
Hello, Is it possible to load modalview content form a remote link, the same way you would use a Kendo Window? I'm trying to achive this, I set the href of my button as simply a remote link (no #), but its not working. it gives Uncaught Error: Syntax error, unrecognized expression: /WebUI/Account/Login So basicly it doesnt recognize the link?
Pete
Top achievements
Rank 1
 answered on 30 Jan 2013
1 answer
141 views
I am trying to get my grid filter drop downs bound to my data sources by following the demos but my ui functions are not getting called.

I have cut things down to the smallest subset of data I can and still my filters are just the stock ones and my functions never seem to get triggered.

$("#searchResults").kendoGrid({
            dataSource: seachResultsDataSource,
            filterable: {
                extra: false,
                operators: {
                    string: {
                        startswith: "Starts with",
                        eq: "Is equal to",
                        neq: "Is not equal to"
                    }
                }
            },
            columns : [                   
                    {
                        title: "Area",                       
                        field: "AreaID",
                        filterable: {
                            ui: areaFilter
                        }
                    }]
});
 
// Never gets called.
function areaFilter(element) {  
    kendoHelper.BindDropDownList(element, dataSources.areaDataSource);
}
The helper function used works perfectly everywhere else I use it and as it is break points indicate the areaFilter is never called to do anything anyway.  Is there some obvious error in this?  Futher - when I do just enter data into the type in box it doesn't get sent to the web server, only the paging options make it, the filters are lost somewhere along the way.
Travis
Top achievements
Rank 1
 answered on 30 Jan 2013
1 answer
197 views
Hello.
When I define a Chart for the first time, I put the Action Name, Controller Name and Route Values:
.DataSource(datasource => datasource
.Read(read => read.Action("DataForEvo", "Home", new { seriename = "Default", category = "Default" }))
But later, I need to reload the chart with new 'route values':
I have 2 charts in the same page, at the bottom a "Bar Chart", and at the top a "Line Chart", when the user click any serie of the Bar Chart, the Line Chart should be updated with relative data.

In the "Bar Chart" I have the Series Click event:
 
.Events(ev => ev.SeriesClick("onSeriesClick")))

where I can capture the serie name, category and value. From here using jquery I can capture the chart
var Chart = $("#chart").data("kendoChart");

maybe exist a method or way to call again the action with new 'route values'.

Many Thanks.
Petur Subev
Telerik team
 answered on 30 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?