Telerik Forums
Kendo UI for jQuery Forum
4 answers
380 views
Hello,

I am using the HierarchicalDataSource to bind data to my tree.
I would like to set a node selected when the data is returned from the server on the initial load.
I am currently trying the following.

Please note: in the initialization of tree, I am trying the set the attribute "selected" to the value of a property in my model object.
data = new kendo.data.HierarchicalDataSource({
    transport: {
        read: {
            url: "/Controller/Action",
            dataType: "json"
        }
    },
    schema: {
        model: {
            id: "Id",
            hasChildren: "HasChildren"
        }
    }
});
 
$("#tree").kendoTreeView({ 
    dataSource: data,
    dataTextField: "Alias",
    selected: "Selected"
});

Is this possible, what I am trying to achieve?


Andrew
Top achievements
Rank 1
 answered on 23 Aug 2012
1 answer
751 views
I'm probably missing something simple here, but when you add a ListView to a view the entire background becomes striped.  Is there a way to disable this (or alternatively, have the same striped background on all views, even if they don't contain a ListView).

Thanks
Petyo
Telerik team
 answered on 23 Aug 2012
10 answers
425 views
Hi,

I am using the kendoUI window with the following code:

var window = $(".productAddedToCartModalDialog").kendoWindow({
                draggable: false,
                resizable: false,
                width: "300px",
                height: "100px",
                title: "Shopping Cart Notification",
                modal: true,
                actions: ["Close"],
                visible: false
            }).data("kendoWindow");

window.center();
window.open();

However in IE 7 and 8 as well as Firefox 3.6, the window is centered on the current view port only the first time it is open. When I scroll for example further down the page and trigger the action which executes the code above, the window, just shows in the place it was shown before, which is somewhere up the page, where the user cannot see it.
I tested this in Chrome and Firefox 8 and it works fine. Firefox 3.6 does not bother me as much as the IE situation.
Is there a workaround for this problem.

Thanks!
Dimo
Telerik team
 answered on 23 Aug 2012
1 answer
215 views
I have the following:
$("#newBatchWindow").kendoWindow({               
    width: "425px",
    height: "375px",
    title: "New Batch",
    visible: false,
    resizable: false,
    modal: true,
    content: "/Batch/Create"
});

However, when this window is activated using this code, it fails on the call to center(), because batchWindow doesn't contain a reference.
var batchWindow = $('#newBatchWindow').data('kendoWindow');
batchWindow.center();
batchWindow.open();

If I modify the content field to be a full URL, things work as expected. How can I use a relative URL here?
Daniel
Telerik team
 answered on 23 Aug 2012
2 answers
85 views
why can't I search these forums efficiently? Am I missing something?
HR
Top achievements
Rank 1
 answered on 23 Aug 2012
3 answers
195 views
HI forum:
When the type of a cell is date and its value is null, the grid shows the string [object Object] as its value.
When member is null, toString.call(member) returns "[object Object]" instead of "[object Null]" in ObservableObject function for IE8.

I've attached a picture.

Regards,
Oscar.
Travis
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
64 views

I'm filtering my grid with the following code:

$("#grid").data("kendoGrid").dataSource.filter({ logic: "or", filters: [{ field: "MyField", operator: "equals", value: parseInt($("#MyDropDown").val())}] });

This will filter the grid fine, but then when I click the "Add new record" button in the grid toolbar, nothing happens.  Editing and deleting still function, but create/add new does not.
Travis
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
445 views
I'm working on a page where-by a user can edit an Item and a list of Versions for the item.  I'm trying to use Kendo Models for this for 3 reasons:
  1. I'm using the Model elsewhere to bind to a Kendo Grid
  2. The Model easily allows me to create new records as well as edit existing records
  3. I am making use of the Model's dirty flag and isNew() method to determine when changes need persisting and whether or not to call the create or update method of my transport.
Using models has been working great so far, but I ran into a glitch when dealing with nested data.

If I bind to an array directly within my view model, all is fine:
http://jsfiddle.net/jeffdev/LwS9Z/2/

But if I bind to an array with my model, it breaks:
http://jsfiddle.net/jeffdev/LwS9Z/3/ 
Jeff
Top achievements
Rank 1
 answered on 22 Aug 2012
0 answers
168 views

I have the frame structure below:

<frameset rows="*" frameborder="NO" framespacing="0" border="0">
<frame src="principal.aspx" id="main">
</ frameset>

principal.aspx

<script>
var window = $ ("#window"). kendoWindow ({
         width: "50%"
         height: "50%"
         modal: true,
         visible: false,
         actions: ["Refresh", "Maximize", "Close"]
     }). date ("kendoWindow");
</ script>

<iframe SRC="URL" id="frmConteudo"> </ iframe>
<div id="window"> </ div>

Now I have the problem. I'm inside the frmConteudo and want to access the div window. I can access the div window without problems this way:

$ ("#window", frames["main"].document)

However the need to access. Date ("kendoWindow") and the same is void of the two forms below:

var frame = frames["main"].document;
$
("#window", frame).data("kendoWindow");
$
("#window", frame).data(frame, "kendoWindow");

Any idea?

Fabricio
Top achievements
Rank 1
 asked on 22 Aug 2012
1 answer
330 views
I have a fairly simple grid created from html markup. If I add a colspan attribute to a cell in my tbody,  the grid display does not render correctly. It works without the colspan attribute. 
See attached image for what the grid looks like before and after adding the colspan attribute.




Josh Eastburn
Top achievements
Rank 1
 answered on 22 Aug 2012
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?