Telerik Forums
Kendo UI for jQuery Forum
2 answers
115 views
I have a series of master details rows in a grid. In the detail of the master grid is a tab group. The detail grids are inside the individual tabs.

I am trying to format the display of an integer (4 digit year) inside the filter column. Removing the comma.

Here is the detail grid .csthml snippet.
        columns.Bound(s => s.SurveyYear).Filterable(f => f.UI("yearFilterFormatSurvey")).Width(85);
 
<script id="yearFilterFormatSurvey" type="text/javascript">
 
    function yearFilterFormatSurvey(element) {
 
        element.kendoNumericTextBox({
            format: 'n0',
            decimals: 0,
        });
 
    }
 
</script>
The problem is that after the first detail row the formatting is no longer applied.

Also I am unable to move the format code to a .js file? I can't move it to any other .cshtml file either. Many of the detail grids have this column and having to put this filter format code into each of their .cshtml files is pretty "code smelly".

I am running the latest released build. 2013.2.918

Thanks,

Trav
Rosen
Telerik team
 answered on 17 Oct 2013
4 answers
118 views
Att: Kiril Nikolov,

Dunno where else to post this... so here goes:
The (multiple) posts from me about "setting the height of an editor" display erroneously using Safari, Chrome and Firefox on OSX.
Trying to access the thread does not result in the normal forum thread view, but rather an editable field containing some/all of the forum thread-html. 
It seems Kiril Nikolov was able to answer one of the posts that I am unable to get a proper view of - maybe Telerik staff acess forums through another interface?
Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
1 answer
51 views
We are converting an app from Telerik MVC to Kendo UI.  We have jQuery code on our grids to capture the current orderBy and filterBy parameters so we can pass them back to our controller.  The controller then creates an Excel download using those parameters.
However the orderBy and filterBy are now undefined in Kendo.  How do I retrieve those values?
    function onDataBound() {
        $('a.lnkDeal').each(function () {
            this.href = this.href.replace(/&/g, "%26");
        });
        var grid = $("#Deals").data('kendoGrid');
        // Get the export link as jQuery object       
        var $exportLink = $('#ExportToExcel');               
        // Get its 'href' attribute - the URL where it would navigate to       
        var href = $exportLink.attr('href');               
        // Update the 'orderBy' parameter with the grids' current sort state
        href = href.replace(/orderBy=([^&]*)/, 'orderBy=' + (grid.orderBy || '~'));
        // Update the 'filter' parameter with the grids' current filtering state       
        //href = href.replace(/filter=(.*)/, 'filter=' + (grid.filterBy || '~'));               
        // Update the 'href' attribute. Replace all ' with | to avoid security issue
        href = href.replace(/'/g, "|");
        $exportLink.attr('href', href);
    }
Atanas Korchev
Telerik team
 answered on 17 Oct 2013
1 answer
124 views
None of my views ever have scroll bars on them. Also, if I set overflow: auto on a div, it also will not have a scroll bar.

How do I allow scroll bars?
Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
2 answers
118 views
I've got a grid:
$('#myGrid').kendoGrid({
    ...
    scrollable: false,
    ...
});
and I've tried all of these things to change the scrollable property:
$('#myGrid').data("kendoGrid").options.scrollable = true;
$('#myGrid').data("kendoGrid").refresh();
 
$('#myGrid').data("kendoGrid").scrollable = true;
$('#myGrid').data("kendoGrid").refresh();
 
var MyGrid = $('#myGrid').data("kendoGrid");
MyGrid.options.scrollable = true;
MyGrid.refresh();
 
var MyGrid = $('#myGrid').data("kendoGrid");
MyGrid.scrollable = true;
MyGrid.refresh();
Nothing works. How does one change whether a grid is scrollable on the fly?
Vladimir Iliev
Telerik team
 answered on 17 Oct 2013
1 answer
224 views
I have a datasource (array) with Knockout observable properties.
I want the grid to display the value of the observable in the grid.

Grid configuration excerpt:
columns: [
                    { field: "Name"}
]

Here, Name is a Knockout observable. But it doesn't work, because the grid expects a normal js property.
Is there a way to get this working without converting all observables back to normal properties?

Atanas Korchev
Telerik team
 answered on 17 Oct 2013
3 answers
292 views
My view contains a lot of content, and I wish to give the user shortcuts to scroll to specific parts of the page.

I see that it's possible to scroll using scrollTo, but the value has to be given as a number. As screen sizes vary I don't know the specific height values for the different places I wish to scroll.

Is there a smart way to for example scroll to the element with id="ScrollPosition1"?
Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
5 answers
102 views
Endless Scrolling Issues Since Update!
OK another thread as I've worked out my woes are to do with endless scrolling and the kendo update changes.
All I want is to retrieve my data and have it endlessly scroll like it did before. But it appears broken.


This works:
http://jsbin.com/aNApID/8/


This doesn't (its my datasource)
Note: Ive hidden my access keys with 'HIDDEN' so it won't work if you do get the syntax right, I just want to be pointed in the right direction

var dataSource = new kendo.data.DataSource({
    pageSize: 10,
    serverPaging: false, //specifies whether the paging should be handled by the service
   transport: {

                read: {
                type: 'GET',
                headers: {'X-Parse-Application-Id':'HIDDEN','X-Parse-REST-API-Key':'HIDDEN'},
                url: "https://api.parse.com/1/classes/Listings/?where={\"State\":\"VIC\",\"EndDateTime\":{\"$gte\":{\"__type\":\"Date\",\"iso\":\""+localStorage.ls_tempdate+"\"}}}&order=StartDateTime",           
                dataType: "json" // JSONP (JSON with padding) is required for cross-domain AJAX
                    },
        parameterMap: function(options) {
            var parameters = {
                q: "javascript", //additional parameters sent to the remote service
                rpp: options.pageSize,
                page: options.page //next page
            };

            return parameters;
        }
    },
    
 schema: { // describe the result format
        data: "results" // the data which the DataSource will be bound to is in the "results" field
    }
});

Kiril Nikolov
Telerik team
 answered on 17 Oct 2013
1 answer
70 views
i've got a strange problem using transport.destroy:

First i have a Listview with a swipe event to open the delete option.
i did implement this: http://demos.kendoui.com/mobile/listview/editing.html#/ in my app.
everything work fine, except destroy will be called for X+1 (x = deleted items)

At first deletion it will be called once, at the 2nd time it will be called twice and so on.

Here is the JSBin: http://jsbin.com/AGAGUfE/11/

Did i implement something false?
or is it a bug in Kendo UI mobile? (i think kendo Ui is the same)


Thanks for your help
domiSchenk
Top achievements
Rank 1
 answered on 17 Oct 2013
2 answers
104 views
Hi,
I m create a kendo Excel grid with hierarchy. And last column I added a action button.
I need to get first column data of the grid when clicking that edit button.

This is my try. But its not working.

function On Click(e) {
        e.preventDefault();
        var element = $(e.target);
        var grid = element.closest("[data-role=grid]").data("kendoGrid");
        var dataItem = grid.dataItem(element.closest("tr"));

        alert(dataItem.ProductID);
       
    }

Thanking
Håkan
Top achievements
Rank 1
 answered on 17 Oct 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?