Telerik Forums
Kendo UI for jQuery Forum
0 answers
118 views
I just worked through adding a MultiSelect fillter on a page with a grid, and didn't see anything in the forums that addressed this issue, so I thought I would post the result that I came up with.
<%= Html.Kendo().MultiSelectFor(m => m.FilterRoleIds)
        .Placeholder("Select Roles")
        .DataTextField("RoleName")
        .DataValueField("ApRoleId")
        .BindTo(ViewBag.ApRolesList)
%>
  
<%= Html.Kendo().MultiSelectFor(m => m.FilterCompanyIds)
        .Placeholder("Select Companies")
        .DataTextField("CompanyName")
        .DataValueField("CompanyId")
        .BindTo(ViewBag.CompanyList)
%>
  
<script language="javascript" type="text/javascript">
    function additionalData() {
        return {
            roleIds: "<%= ApRoleController.ReturnListValues(Model.FilterRoleIds) %>",
            companyIds: "<%= ApRoleController.ReturnListValues(Model.FilterCompanyIds) %>"
        };
    }
</script>
 
        public static string ReturnListValues(List<string> list)
        {
            if (list == null || list.Count == 0) return "";
 
            string s = string.Empty;
 
            foreach (var item in list)
            {
                if (s != string.Empty)
                    s += ",";
 
                s += item;
            }
 
            return s;
        }
Above is what I came up with.
Telerik came up with the following:
<script language="javascript" type="text/javascript">
    function additionalData() {
        var roleIds = <%= Html.Raw(Json.Encode(Model.FilterRoleIds)) %>;
        var data = {};
        for(var i=0; i< roleIds.length;i++){
            data["FilterRoleIds[" + i + "]"] = roleIds[i];
        }
        return data;
    }
</script>
Hopefully, this will be helpful to somebody.
Atlas
Top achievements
Rank 1
 asked on 12 Jul 2013
2 answers
187 views
Hi, I have a dropdownlist that I refresh with other code. It loads a list of items to process, once an item is processed the item is basically marked as done and when the dropdownlist is refreshed it no longer is in the dropdownlist. This works just fine till I get to the last item, when it is processed and the dropdownlist is refreshed the json basically returns a empty List<ViewModels.DayEndCycleNumbersViewModel>, 0 items, what happens it the dropdownlist isn't cleared to nothing. If I refresh the page the dropdownlist is empty. How can I get the dropdownlist to be empty when it is refreshed?

Thanks,
John
John
Top achievements
Rank 1
 answered on 12 Jul 2013
1 answer
101 views
I'm using Pie Charts in a mobile ScrollView. On PC, while hovering the charts with mouse cursor, each pie is highlighted by creating an overlay. This overlay prevents me from swiping through views. How can  I disable it?

seriesHover: function(e){
   e.preventDefault()
}
The above is not working, even though it gets triggered every time. Of course, on mobile there is no mouseover, but when you tap and swipe, the overlay gets toggled, so swiping works only half of the time .

Alexandru
Top achievements
Rank 1
 answered on 12 Jul 2013
2 answers
618 views
I have a master-detail grid and I want to use a Kendo NumericTextBox as ClientTemplate for one of the columns in the detail grid:

columns.Bound(x => x.MaximumWindowWeeks).ClientTemplate(this.Html.Kendo().NumericTextBox<int>().Name("Test").ToClientTemplate().ToHtmlString());

When expanding the details for a given row, I get the error below and none of the rows are rendered:

SyntaxError: unterminated string literal
...itle":"Maximum Window Weeks","template":"<input id=\"Test\" name=\"Test\" type=\...

Do I need to somehow "escape" the column client template, since I'm defining it as part of another client template?

Thanks!
Marius
Top achievements
Rank 1
 answered on 12 Jul 2013
3 answers
111 views
I can't seem to find a way to find my old answered posts in this forum. Is there a way?
Alex
Telerik team
 answered on 12 Jul 2013
3 answers
268 views
I'm looking to use Kendo to enhance an existing PHP web app at the company I work for. Currently all of the data in the app is extracted from a MySQL database, processed and setup as an array, then output as an HTML table.

I'd like to use Kendo as a 'drop-in' replacement for the tables, which means all the data will come from PHP arrays. I've read the docco and got started using the PHP Wrapper, and the following code:
$dataSource = new \Kendo\Data\DataSource();
$dataSource->data($my_array)

Most things are working great, and I'm very impressed. However there's one problem - dates aren't sortable. This is a pretty killer issue for the web app, given that it has a lot of inventory and sales information.

I think the problem is the format of the dates - currently they are 'raw' dates in d/MM/yyy format (no leading  0 on days). But I have also experimented with injecting them them as dd/MM/yyyy, yyyy-mm-dd, and unix time stamps (second since the epoch, otherwise know as date('u') in PHP). But no matter what I do, the dates always sort as if they are just numbers.

Does anyone know what date format is acceptable to Kendo UI's PHP Wrapper, when coming from a PHP array?

I've succesfully used format({0:c}) to represent currency information, and I've read that format({0:d}) can accomplish something with dates, but I've had no luck. I've also tried format({0:d/MM/yyyy}) and a handful of others, but it doesn't change the data.

Does the ->format() function have any relationship to sorting? Or does it just change the visual output of the columns? 

I'm aware that I can hook Kendo up to the data sources directly (and that this is a preferred option), but as I said I'm attempting to use this as a 'drop-in' replacement for tables right now. It's not worth the effort of rewriting so much of the app at this stage, I'm just evaluating. Further, both Easy UI and dHTMLxGrid are capable of taking a PHP array that includes a date and treating it correctly, so I'd be very surprised if Kendo couldn't.

I would have thought this was a pretty common use case, but I can't find anything specific to this example in the docs, tutorials, API etc. Can anyone assist?

Regards,
Sam Miller
Alexander Valchev
Telerik team
 answered on 12 Jul 2013
1 answer
271 views
Hi, 
when I resize the kendoGrid header columns , the background color (or borders) of the content table don't stretch ! I have attached two images which can explain better what I mean.
Regards,
Atiyeh
Dimo
Telerik team
 answered on 12 Jul 2013
1 answer
202 views
Hi,

Is there any example on how to use data from data source in php create update, insert, delete ect?
Sebastian
Telerik team
 answered on 12 Jul 2013
1 answer
1.4K+ views
I have a grid bound to an MVC Model.

I need to create a custom footer where in every cell I place custom html.

Is this possible?
Dimo
Telerik team
 answered on 12 Jul 2013
1 answer
275 views
Hi,

I am new to Kendo UI and are trying out the demo on iPad to check compatibility.

http://demos.kendoui.com/web/grid/virtualization-remote-data.html

I noticed that whilst the grid scrolls, it does not show horizontal / vertical scroll bars in either Safari or Chrome on iOS (6.1.3).  Is this something due to be fixed?

Thanks,
Ben
Alexander Valchev
Telerik team
 answered on 12 Jul 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?