Telerik Forums
Kendo UI for jQuery Forum
1 answer
231 views
I am applying some client side filtering on my grid, however, I would like to change the filtering logic to use "OR" instead of "AND".

Example:
I am adding in multiple filters...
{ field: 'Status', operator: '==', value: 'Active' }
{ field:
'Status', operator: '==', value: 'Pending' }

The default logic on the grid will cause it to filter like so - Status = Active AND Status = Pending.  

Instead I want to have my fitlers do the following: Status = Active OR Status = Pending

I cannot find any examples of this.  Is this possible to do?
Nick
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
226 views
Hi
I have this view :
<div class="draggable" style="width: 50px;height: 50px;background-color: chartreuse;">Test</div>


<div id="droptarget">
    <div class="test1" style="background-color: aqua; width: 200px; height: 200px;">
      Start dragging.
      </
div>
    <div class="test2" style="background-color: brown; width: 200px; height: 200px;">
        Start dragging.
     </
div>
</div>


when draggable Div added to test1 Div or test2  i want the draggable Div can switch between the test1 or test2.
How do i ?
Tanx.
Nohinn
Top achievements
Rank 1
 answered on 03 Oct 2012
0 answers
203 views
Hi, I think I found some incorrect behaviour for treeview checkboxes.

given:
@(Html.Kendo().TreeView()
    .Name("tree")
    .Checkboxes(checkboxes => checkboxes.CheckChildren(true))
    .Items(treeview =>
    {
        treeview.Add().Text("Furniture").Id("1")
            .Expanded(true)
            .Items(furniture =>
            {
                furniture.Add().Text("Tables & Chairs").Id("2").Expanded(true)
                    .Items(fun =>
                        {
                            fun.Add().Text("specialtable 1").Id("9").Expanded(true)
                                .Items(f =>
                                {
                                    f.Add().Text("4thlevel 1").Id("13");                                    
                                });
                            fun.Add().Text("specialtable 2").Id("10");
                        });
                furniture.Add().Text("Sofas").Id("3");
                furniture.Add().Text("Occasional Furniture").Id("4").Expanded(true)
                    .Items(fun =>
                    {
                        fun.Add().Text("occ 1").Id("11");
                        fun.Add().Text("occ 2").Id("12");
                    });
            });
    })
)
Reproduction steps:
1. Check Furniture, then uncheck "specialtable 1" and "occ 1", and then check "Furniture" again.  the 2 intermediate nodes, "Tables & Chairs" and "Occasional Furniture" remain in the "partial" state.  see kendotreeview1.png

2. Check "Furniture", then uncheck "4thlevel1", then check "Furniture" again.  "specialtable1" is not checked at all.  See kendotreeview2.png.

3.  Check "furniture", uncheck "specialtable1", check "4thlevel1", check "tables & chairs".  "special table1" is still checked.  See kendotreeview3.png

4.  Check "Furniture", uncheck "4thlevel 1", check "tables & chairs".  "special table1" is unchecked.  See kendotreeview4.png.

It seems likely all of these are related. 
Kuangyi
Top achievements
Rank 1
 asked on 03 Oct 2012
0 answers
179 views
Hello,

I wrote a little demo that has two divs, one contains draggable buttons and the other is the drop target.
I can drag buttons into the drop target just fine, and the drop target itself is also draggable so I can move the buttons around inside the drop target. 

This works, but when I try to drag a button from the dropTarget div to some other place on the page, instead of just failing to drop it there (on a non-droppable section), the button disappears from the drop target div.

This is the code, I'd appreciate if someone could tell me why this happens and if it can be avoided:

<div id="draggable" style="background-color: lightgrey; height: 60px">
Drag the buttons to the yellow section<br/>
    <button >Button 1</button>
        <button >Button 2</button>
        <button >Button 3</button>
</div>
<div id="dropTarget" style="background-color: yellow; height: 60px">
</div>​

var draggable = $("#draggable").kendoDraggable({
    filter: 'button',
    hint: function(item) {
        return $(item).clone();
    }
});
var dropTarget = $("#dropTarget").kendoDropTarget({
    dragAndDrop: true,
    drop: droptargetOnDrop
}).kendoDraggable({
    filter: 'button',
    hint: function(item) {
        return $(item);
    }
});
  
  
function droptargetOnDrop(e) {
  //  console.log("drop called");
    var $target = $(e.target);
    $(e.draggable.hint).clone().appendTo(e.dropTarget)
}

Thanks
Lior
Top achievements
Rank 1
 asked on 03 Oct 2012
2 answers
401 views
Hi, so I have a grid that shows folders and files.  How do I add 2 create button in the Grid so that I can have 1 button to create Folder and 1 button to create File in MVC asp.net that calls different action in the backend? And those two create buttons needs to be using ajax.

Here is how i am doing it for 1 button:

.ToolBar(c => c.Create())
    .DataSource(dataSource => dataSource
        .Ajax()
            .Model(model => model.Id(f => f.FileId))
                .Read(read => read.Action("GridRead""Files"))



Thanks.
Kai
Top achievements
Rank 1
 answered on 03 Oct 2012
1 answer
107 views
I would like to see an animation after initializing a "div" with many widgets created dynamically. There is no way to know when "kendo.init ($ (" # mydiv "));" ends?

Thanks
Petyo
Telerik team
 answered on 03 Oct 2012
0 answers
177 views
Hi,

     I have a problem with multiple window on page.
I have a grid with some items. When i click one row then I open a window. I can open a few windows.
The problem is when I have to close current window, I don't  know which window is exactly that I shoulld close, I haven't any id to recoginize where (which window)  a click my submit or  custom close  button. 

Another problem is validation when I open two windows and I  click submit botton on the one window  then validate another one.

Have you any advice?
  
Dawid
Top achievements
Rank 1
 asked on 03 Oct 2012
0 answers
193 views
Hello, i have a TreeView in my MVC application. When certain item is pressed, the div on page should change responding to the item ID.  There is my code for that page (view):

@model List<Omnitel.Models.Directory>

    @(Html.Kendo().TreeView()
            .Name("Treeview")
            .Events(events => events
                .Select("onSelect")
            )
            .BindTo(Model, mapping =>
            {
                mapping.For<Omnitel.Models.Directory>(binding => binding
                        .ItemDataBound((item, category) =>
                        {
                            item.Id = category.Id;
                            item.Text = category.Title;
                            item.BindTo(category.SubDirectories, mapping2 =>
                            {
                                mapping2.For<Omnitel.Models.Directory>(binding2 => binding2
                                        .ItemDataBound((item2, category2) =>
                                        {
                                            item2.Id = category2.Id;
                                            item2.Text = category2.Title;
                                            item2.BindTo(category2.SubDirectories, mapping3 =>
                                            {
                                                mapping3.For<Omnitel.Models.Directory>(binding3 => binding3
                                                        .ItemDataBound((item3, category3) =>
                                                        {
                                                            item3.Id = category3.Id;
                                                            item3.Text = category3.Title;
                                                        }
                                                ));
                                            });
                                        }
                                ));
                            });                      
                        }
                ));
            })
    )

    <script>
        var treeview;
        function onSelect(e) {
            var url = @Url.Action("GetDocument", "TreeView", new { e.sourceNode.ID );
        }
    </script>

As u can see, i want to put put an Id in each item. Is it possible? and how? Need fast response...

Tomas
Top achievements
Rank 1
 asked on 03 Oct 2012
1 answer
492 views
I have a grid and it allows inline editing.

The add, delete and save operations on the grid, intermittently gives this error: 

  1. Uncaught TypeError: Cannot read property 'BrandID' of undefined
    1. (anonymous function)
    2. (anonymous function)kendo.web.js:9
    3. o.extend._acceptkendo.web.js:9
    4. (anonymous function)kendo.web.js:9
    5. (anonymous function)jquery-1.8.2.js:1127
    6. g.(anonymous function).call.c.successkendo.web.js:9
    7. callback

The 'BrandID' is the Model ID

Please help
Dimo
Telerik team
 answered on 03 Oct 2012
0 answers
96 views
hi...,

 Is there any possiblity to get the the edited values in to an array for listview in an edit mode.

Thankyou,
Ruqsana.
Ruqsana
Top achievements
Rank 1
 asked on 03 Oct 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
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?