Telerik Forums
Kendo UI for jQuery Forum
7 answers
622 views
Hi,

I am loading content to my page with ajax calls. This content contains dropdownlists. They create a list DIV in the BODY tag. When the content is updated with a new ajax call, these DIV tags remain in the BODY tag, so they are accumulating there.
How to clean this up? This is especially a problem when you have a one page setup of your application. It is a kind of a 'memory leak' all these DIV tags which will not be used anymore.
Ideally they should not be in the BODY tag, but near the location in the DOM where they are used. But I can imagine that will give trouble with display the list on top of other content.

Ofcourse this applies also for other widgets which have such popups, like e.g. combobox and grid (filter dialogs).

Any thoughts on this housekeeping issue appreciated.

Regards, Jaap
Bryan Brannon
Top achievements
Rank 2
 answered on 27 Feb 2013
1 answer
58 views
Hi there, I got a kendo chart category axis described like this :

categoryAxis: {
            majorGridLines: "none",
            type: "date",
            field: "Day",
            baseUnit: "month",
            labels: {
                font: "6.25pt Verdana",
                rotation: -45,
                template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
            },
            title: {
            }            
        }

I also got another Kendo chart with category axis liek this :

categoryAxis: {
            majorGridLines: "none",
            field: "Day",
            labels: {
                font: "6.25pt Verdana",
                rotation: -45,
                template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
            },
            title: {
            }
        }


So in the second example everything works fine except I get a date for each point in the chart, so I wanted to make it show only every 1st of the month ( there are 6 months in total). So the first code snippet should do that but i get an error: "Uncaught TypeError: Object [object Date] has no method 'substr' ". I assume I should use some sort of ekndo.dateparse, but im not sure of the syntax of it. Could someone pelase help.
Note that the tooltip shows the date just fine.

Please find a screenshot attached,

Regards,
Neil




Iliana Dyankova
Telerik team
 answered on 27 Feb 2013
1 answer
116 views
I have an app using Kendo and Sammy. The app is a SPA app with multiple views and each page has a Sammy route associated with it. On the second page, I need to open a kendo window. When I do so, the Sammy router gets invoked which is something I do not want. The new window has no path associated with it, so it matches the default route which causes the app to change its page back to the home page. Can anyone tell me either how to prevent the default route from running when I open the kendo window? I guess another interesting but optional fix would be to associate a sammy route with the kendo Window. 
Alex Gyoshev
Telerik team
 answered on 27 Feb 2013
1 answer
112 views
Hi

Is it possible to implement a popover that explores a hierarchy?  The HierarchicalDataSource docs suggest that it's only the TreeView that can handle this, which I'm assuming means that it's not possible to make the popover do this - but I've not tried it out yet. 

If there's any examples of how this might be done, links would be hugely appreciated. 

I'm trying to implement a popover that allows the user to browse a hierarchy, sample screenshot attached.

Thanks,

--
John Clayton
Alexander Valchev
Telerik team
 answered on 27 Feb 2013
1 answer
161 views
Hello all.
I'm wondering if anyone can help me here.

There are 2 grids on a page. (For example).
On the first grid ('grid1') the databinding is in client side AJAX. The grid has paging, filtering, sorting, etc, the usual stuff.

On the second ('grid2') grid (set the same as above), I have an event for saveChanges() since the 2nd grid has batch update enabled.
On the client side javescript of the 2nd grid, I need to get a row with a particulat attribute from the first grid.
Say for e.g.  Get the row with dataFieldCode = "MyCode". Please note, dataFieldCode is NOT the unique ID or a primary key.
Moreover, I want the actual underlying data and not the view, since this row maybe on Page 3 of the first grid, but the user has not navigated to page 3.

So just getting the view() of the data does not work.

I could not find a single example, where you get a data item with a given attribute (like a find or a seek) and you are not seeking the DOM. I need the underlying dataitem.

Any help here please?
Vladimir Iliev
Telerik team
 answered on 27 Feb 2013
2 answers
1.7K+ views
I have been trying to get this piece of code to work for a while now, and I have run out of ideas. I looked online and could not find anything helpful.

I have a grid defined which has a lists of persons. User can click on the person to add it to their contacts. I have a custom command which does a post to my Action.

This is probably going to end up being something simple that I am overlooking..

I am unable to get the dataItem of the Grid. Following is the error I receive:

Uncaught TypeError: Cannot read property '0' of undefined
y.extend.dataItem 
addContact
p.isFunction.f
p.event.dispatch 
g.handle.h
Following is my Javascript function:

function addContact(e) {
 
        debugger;
 
        e.preventDefault();
 
        var dataItem = this.dataItem($(e.currentTarget).closest("tr")); // <-- ERROR IS HERE
        var id = dataItem.Id
 
        var url = "@Url.Action("AddContact", "Contacts")";
 
        alert(url);
 
        $.ajax({
            url: url,
            type: 'POST',
            data: { contactID: id },
        });
    }


Grid:

@(Html.Kendo().Grid(ViewBag.Contacts as List<Contacts>)   
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.FirstName);
        columns.Bound(p => p.LastName);
        columns.Bound(p => p.ReleaseDate);
        columns.Command(command => command.Custom("Add").Click("addContact")).Width(80).HtmlAttributes(new { title = "Add Contact" });
    })
    .Groupable()
    .Pageable()
    .Sortable()
    .Scrollable(s => s.Height("auto"))
    .Filterable()
    .DataSource(dataSource => dataSource
    .Server()
    .PageSize(50))
)

Used scripts:

<script src="http://cdn.kendostatic.com/2012.3.1315/js/jquery.min.js"></script>
    <script src="http://cdn.kendostatic.com/2012.3.1315/js/kendo.all.min.js"></script>
    <script src="http://cdn.kendostatic.com/2012.3.1315/js/kendo.aspnetmvc.min.js"></script>
    <script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>

I am not sure what is causing this, any help would be appreciated.

Thank you,
Aleks
Aleksandar
Top achievements
Rank 1
 answered on 26 Feb 2013
1 answer
108 views
HI,

Alexander Valchev
Telerik team
 answered on 26 Feb 2013
5 answers
1.3K+ views
Hi,

When looking at the Twitter example I have adapted it with my own data.

http://demos.kendoui.com/mobile/listview/pull-with-endless.html

I need to make a slight change:
1. In android mobile the default background color of listview is black but i want to change it to different color(yellow) 
2. Also there is default padding(some space around each row)  but i want it to remove(i,e padding=0).
3. When tapping each 'row' I want it to highlight by red for few seconds


Thanks,
Lakshmikanth
Alexander Valchev
Telerik team
 answered on 26 Feb 2013
2 answers
654 views
Hello.

I need to make the dropdown of autocomplete display all items listed in the datasource. I have found the .search() method and it almost does what I want, the only problem is that it requires me to pass it at least one character and does not appear to work  if I specify an empty string. 

How would I get all items to show?

Here is a jsfiddle that illustrates what I'm trying to do...
http://jsfiddle.net/3j2GP/1/
John
Top achievements
Rank 2
 answered on 26 Feb 2013
3 answers
175 views
If i select today in kendo date picker in add screen, kendo set the selected date as yesterday date in Grid.

i attached add screen image and kendo grid display date.
Brad Fulton
Top achievements
Rank 1
 answered on 26 Feb 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
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
Bronze
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
Bronze
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?