Telerik Forums
Kendo UI for jQuery Forum
1 answer
103 views
1. Using Chrome, go here: http://demos.kendoui.com/web/grid/editing-popup.html 
2. Right-click and inspect element, and then search for the word 'window' (no quotes). Note that it finds 2 instances.
3. Click on Add new record, and then Cancel
4. Right-click and inspect element, and then search for the word 'window' (no quotes). Note that it now finds 8 instances. If you repeat 3 and 4, it will go up by 6 instances each time, which means that the DOM elements are being left when dismissing the popup dialog.

This is an issue for us because we are using a Template with some javascript to do some dynamic display of other controls based on a combobox value. Because of this issue, we aren't making the proper controls (in)visible because it is finding other instances of the controls from the other windows that are still in the DOM.

Can you suggest a workaround until this gets resolved? Thanks.
Clint
Top achievements
Rank 1
 answered on 13 Aug 2012
0 answers
183 views
I had a treeview, I got the json data from server side, and tried to bind it to treeview, but it didn't work, return all "undefined", but the same data I copied them into local, then hard code them into the treeview, it work fine, why ?

 1) below is my code.
<script type="text/javascript">
    $(function () {
        $.getJSON('@Href("~/api/TrackingCodes/action/GetPageTree/?orgID=17&typeIds={\"1\", \"2\", \"10\"}")', function (ret) {
            var Sitetrees = new kendo.data.HierarchicalDataSource({
                data: ret,
                schema: {
                    model: {
                        id: "Value",
                        children: "Node"
                    }
                }
            });
            $("#DivPageTree").kendoTreeView({
                dataSource: Sitetrees,
                dataTextField: "Text"
            });
        })
    })
</script>



2) It works when I copied these data into local

<script type="text/javascript">
             var Sitetrees = new kendo.data.HierarchicalDataSource({
                data: [...................],
                schema: {
                    model: {
                        id: "Value",
                        children: "Node"
                    }
                }
            });
            $("#DivPageTree").kendoTreeView({
                dataSource: Sitetrees,
                dataTextField: "Text"
            });
</script>
max
Top achievements
Rank 1
 asked on 13 Aug 2012
8 answers
802 views
Hey guys,

I was looking at the latest internal build (808), and it looked like you guys implemented RequestEnd on the DataSource, which is going to solve a number of problems I'm having in my app. So I set up the following code:

    updateComplete = function(e) {
        alert(e.type);
    };
 
    $(document).ready(function () {
 
        var floorPlanDataSource = $("#propertyUnitEditGrid").data("kendoGrid").dataSource;
        floorPlanDataSource.bind("requestEnd", updateComplete);
));

The problem is, this event appears to only fire on the first read. My grid is using a remote datasource in batch mode, and the event does not fire when I add, update, or delete a row (with the built-in toolbar buttons), nor does it fire when I hit the built-in refresh button in the footer.

Digging through the code, it appears the event is wired into the sync, success, and error functions... but the only place the success function appears to be wired into is the Read function on the RemoteTransport class. If you look at the create, update, and destroy methods on RemoteTransport, you'll see they don't appear to leverage the success or error functions at all... at least, not the way you would expect.

It seems to me that an easier implementation of all of this would be to modify the Transports to start the CRUD methods by throwing the requestStart event, then passing in wrapped success and error functions that work similarly to the existing read method, where requestEnd is thrown before the passed in success or error handler is executed.

Then, the dataSource would handle these events from the Transport, and re-throw them back down to the implementer.

So 1) is the feature in its current state considered complete?
2) Did I hit a bug or am I doing something wrong?
3) Does my explanation of a "better" approach make sense?

Thanks!

Edit: I was doing something wrong. Mental note: Next time, test new Kendo feature on page with one Grid, not seven. I pasted in the wrong GridID, to the bind function, so I was testing the results in a different grid than the one that was wired up. My bad.
Robert
Top achievements
Rank 1
 answered on 13 Aug 2012
0 answers
75 views
Hi,

Is there a way to prevent Grid's AJAX call when no results are returned. Looks like this is the default behviour.

Thanks
Ritu
Ritu
Top achievements
Rank 1
 asked on 13 Aug 2012
0 answers
283 views
I have an data model for a recursive parent-child relationship like this:

    public class ActivityCategory
    {
        public int CategoryID { getset; }
        public string CategoryName { getset; }
        public int? ParentCategoryID { getset; }
        public ActivityCategory Parent { getset; }
...
    }

The parent may be null.  I'm trying to set my grid up like this:
        @(Html.Kendo().Grid(Model)
                    .Name("ActivityCategoryGrid")
                    .Columns(columns =>
                    {
                        columns.Bound(resource => resource.CategoryName).Title("Name");
                        columns.Bound(r => r.Parent != null ? r.Parent.CategoryName : "");
which fails with

Bound columns require a field or property access expression.

How should I handle this?
Elton Saulsberry
Top achievements
Rank 1
 asked on 13 Aug 2012
0 answers
307 views
HI,

I'm using kendoTreeView  and  "coloricons-sprite.png" to show images(like folder/pdf... ) .  But, i want to show custom image (like close) .  Plz suggest me how can i make use of other images (say close button) instead of sprite Image .

Im using code : 
<ul id="treeview">
                   <li data-expanded="true">
                       <span class="k-sprite folder"></span>
                       My Web Site
                       <ul>
                           <li data-expanded="true">
                               <span class="k-sprite folder"></span>images
                               <ul>
                                   <li><span class="k-sprite image"></span>logo.png</li>
                                   <li><span class="k-sprite image"></span>body-back.png</li>
                                   <li><span class="k-sprite image"></span>my-photo.jpg</li>
                               </ul>
                           </li>
                           <li><span class="k-sprite html"></span>about.html</li>
                           <li><span class="k-sprite html"></span>contacts.html</li>
                           <li><span class="k-sprite html"></span>index.html</li>
                           <li><span class="k-sprite html"></span>portfolio.html</li>
                       </ul>
                   </li>
               </ul>
 
 
 
  <style>
             
               #treeview .k-sprite {
                   background-image: url("../../content/web/treeview/coloricons-sprite.png");
               }
 
               .rootfolder { background-position: 0 0; }
               .folder { background-position: 0 -16px; }
               .pdf { background-position: 0 -32px; }
               .html { background-position: 0 -48px; }
               .image { background-position: 0 -64px; }
 
           </style>
 
    <script>
               $(document).ready(function() {
                   $("#treeview").kendoTreeView();
               });
           </script>

 
Pawan
Top achievements
Rank 1
 asked on 13 Aug 2012
4 answers
443 views
HI ,

I 'm using  "kendoTabStrip" .  

 I'm trying  to achieve   When i  click on DeleteImage , the tab should be closed (removed) . But Im unable to get same . 
 Please suggest me where I'm going  wrong . Following are codes I'm using :

 Thanks,
 Pawan

<div id="dtabstrip">
        <ul>
            <li class="k-state-active">First Tab
                <img src="images/DeleteIcon.gif" style="padding-left: 10px; z-index: 1111" onclick='DeleteTabs(this);' />
            </li>
            <li>Second Tab</li>
        </ul>
        <div>
            1111111sdffds</div>
        <div>
            2222ssadasfas</div>
    </div
 
 var dtabStrip = $("#dtabstrip").kendoTabStrip({
            animation: {
                open: {
                    effects: "fadeIn"
                },
                close: {
                    duration: 200,
                    effects: "fadeOut"
                }
            }
 
        });
 
  function DeleteTabs(ImgObj) {
            var aa = $(ImgObj).closest("li").text() ;
            dtabStrip.remove($(obj).closest("li"));
        }
John DeVight
Top achievements
Rank 1
 answered on 13 Aug 2012
0 answers
140 views
I think this was raised previously but I could not find it. Nested grids do not seem to have a way to handle field substition within a template region.

columns.Bound(o => o.Id).ClientTemplate("#=Id#");

If this is used within a nested grid this gets replaced prematurely by the Id of the parent row. Can anyone confirm 

If there is a work around for this
If this has been fixed because I am not seeing it working in the latest version

Thanks
Adam
Top achievements
Rank 1
 asked on 13 Aug 2012
1 answer
182 views
I am having a problem getting column level filtering and sorting to work when using the html helper.

I assumed the following would be a column level override, yet this doesn't disable either sorting or filtering.
columns.Bound(o => o.Id).Sortable(false).Filterable(false)

If I don't add the filterable method to the grid then filters don't show for any columns.
//.Filterable()

Yet writing the Javascript by hand it seems setting the column level works. It seems like the column level isn't rendering the correct markup through the helper. Is there a way to access an existing grid and change these options I want to try to avoid rewriting the grids in Javascript which would not only be a pain but defeat the usefulness of the html helper.

I have tried accessing the current Javascript value for a given column to no prevail

var grid = $("#grid").data("kendoGrid");
document.write(grid.columns[1].filterable());
grid.columns[1].filterable(false);
grid.refresh();
Adam
Top achievements
Rank 1
 answered on 13 Aug 2012
3 answers
430 views
I've seen references to "odata" and "aspnetmvc-ajax", but what are the others? I'm specifically looking for the default type that would be called manually in: kendo.data.transports["somevalue"]

Atanas Korchev
Telerik team
 answered on 13 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?