Telerik Forums
Kendo UI for jQuery Forum
1 answer
94 views
Hi, I try to change data from a combobox dynamically.
I got a object containing a javascrip array (Module.Collection)
I create the combobox like:
$("#cboListe").kendoComboBox({
    dataTextField: "Nom",
    dataValueField: "Id",
    dataSource: Module.Collection,
    filter: "contains",
    suggest: true,
    index: 1,
});

Then when the user click on a button, I call this function:
this.AddItemColl = function () {
    Item = new ObjetA();
    Item.Id = this.Collection.length + 1;
    Item.Nom = "Nom" + (this.Collection.length + 1);
    this.Collection.push(Item);
 
    var combobox = $("#cboListe").data("kendoComboBox");
    combobox.dataSource.read();
}

The collection object grow, but the combobox do not reflec change wih the dataSource.Read();
Any idea?
Thanks a lot.
Alexander Valchev
Telerik team
 answered on 19 Apr 2013
7 answers
1.9K+ views
I notice the following 'features' after attaching a change event to a grid.
 1) The change event fires even when an already selected row is clicked on.
 2) The change event fires when clicking on an anchor or a button element in a grid's row.

Any work-around suggestion for the grid to not fire the change event in the above cases is appreciated.

Thank you in advance.
loi
Top achievements
Rank 1
 answered on 19 Apr 2013
3 answers
81 views
Hi Guys!

It's great to see the addition of the three new widgets to the ThemeBuilder page but i noticed when trying to use the AutoComplete and MultiSelect by typing to bring up the results list it doesn't happen because there is a javascript error being thrown. I'm trying to get a look-and-feel using real life functionality of Kendo UI suite of widgets under different themes.

Could we have this full functionality of AutoComplete and MultiSelect widgets enabled in ThemeBuilder page ? 

Cheers!
Kamen Bundev
Telerik team
 answered on 19 Apr 2013
1 answer
263 views
Hello,

Is it possible to use the horizontal menu with split button instead of regular button to be touch friendly? So i can have a link for each item and a button to open the submenu. Maybe the tree view is better for this task?

I find a way to do it for the first level of the menu with the markup below but i didn't find how to do it with the sub menus
<style scoped>
     #menu > .k-item.empty-split {
        width: 16px;
    }
 
    #menu > .k-item.empty-split > .k-link {
        padding-left: 0;
        padding-right: 0;
    }
</style>   
 
 <ul id="menu">
        <li>Blog
        </li>
        <li class="empty-split">
            <span class="k-link">
                <span class="k-icon k-i-arrow-s"></span>
            </span>
            <ul>
                <li>
                    <div id="template" style="padding: 10px;">
                        <h2>Around the Globe</h2>
                        <ol>
                            <li>United States</li>
                            <li>Europe</li>
                            <li>Canada</li>
                            <li>Australia</li>
                        </ol>
                        <img src="../../content/web/menu/map.png" alt="Stores Around the Globe" />
                        <button class="k-button">See full list</button>
                    </div>
                </li>
            </ul>
        </li>
    </ul>

<script type="text/javascript">
        $(function () {
            $("#menu").kendoMenu({
                openOnClick: true
            });
        });
    </script>
Dimo
Telerik team
 answered on 19 Apr 2013
0 answers
28 views
How to using custom footer temple while binding field?It say studentId undefined,but studentIdis my table property
My codes like this:

columns.Bound(p => p.studentId);
columns.Bound(p => p.Point)
ClientGroupFooterTemplate("<div>average: #=kendo.toString(getPointby(studentId),'n0')#</div><div>max: #= max #</div><div>min: #= min #</div>");
ABC
Top achievements
Rank 1
 asked on 19 Apr 2013
1 answer
296 views
Hello

When I right click on telerik grid without selecting a row, I should be able to see my own context menu.

Which event supports this? I used Onload in the following way.

My Grid is defined in the following way:

@{Html.Telerik().Grid(Model)
    .Name("AccountVisitStatusGrid") 
    .DataKeys(keys => keys.Add("AccountStatusID"))
    .DataBinding(dataBinding => dataBinding.Ajax().Select("_GetAccountVisitStatusCodes", "AccountVisitStatus"))
    .ClientEvents(events => events
                         .OnRowDataBound("Grid_onRowDataBound")
                         .OnDataBound("AcctVisitStatusGridBound")
                         .OnRowSelected("AcctVisitStatusGridRowSelected")
                         .OnError("AcctVisitStatusGridErrored")
.OnLoad("onload")
                         )                
    .Columns(columns =>
    {
        columns.Bound(o => o.Code).Title("Code").Width(100);
        columns.Bound(o => o.Name).Title("Name").Width(150);
        columns.Bound(o => o.Description).Title("Description").Width(150);
        columns.Bound(o => o.PASAccountStatus).Title("PAS Status").Width(150);
        columns.Bound(o => o.IsActive).ReadOnly().Title("Active").ClientTemplate("<input type='checkbox' name='ckActive' <#= IsActive? checked='checked' : '' #> onclick='return false'  />").Width(60);
        columns.Bound(o => o.IsAccount).ReadOnly().Title("Account Status").ClientTemplate("<input type='checkbox' name='ckAccount'  <#= IsAccount? checked='checked' : '' #> onclick='return false' />").Width(120);
        columns.Bound(o => o.IsVisit).ReadOnly().Title("Visit Status").ClientTemplate("<input type='checkbox' name='ckVisit' <#= IsVisit? checked='checked' : '' #> onclick='return false' />");
    })
    .Selectable()
    .Scrollable(c => c.Height("450px"))
    //.Pageable(paging => paging.PageSize(20).Style(GridPagerStyles.NextPreviousAndNumeric).Position(GridPagerPosition.Bottom))
    .Sortable()
    .Filterable()
    .Groupable()
    .Resizable(resizing => resizing.Columns(true))
    .Render();
}

Before, Context menu was only displayed when selected and do right click:
code:

function AcctVisitStatusGridRowSelected(e) {
       // debugger;
        if (!IsEditingDisabled('#btnEditAcctVisitStatus', 'btnEditDisabled')) {
            hideContextMenu(lastAcctVisitStatusDataContextMenu);
            lastAcctVisitStatusDataContextMenu = $(e.row).contextMenu('AcctVisitStatusDataContextMenu',
        {
            menuStyle:
                        {
                            width: 'auto'
                        },
            bindings:
                        {
                            'MenuNewAcctVisitStatus': function (t) {
                                 //debugger;
                                openDialog('N');
                            },
                            'MenuEditAcctVisitStatus': function (t) {
                                // debugger;
                                openDialog('E');
                            }
                        }
        });
        }
    }

Now to enable it just by , right click on grid, how to show up the context menu?????

I used this:


    function onLoad() {
         //debugger;
        $('tr', this).live('contextmenu', function (e) {
       // prevent the browser context menu from showing
       e.preventDefault();
       var $tr = $(this);
      if (!IsEditingDisabled('#btnEditAcctVisitStatus', 'btnEditDisabled')) {
            hideContextMenu(lastAcctVisitStatusDataContextMenu);
      lastAcctVisitStatusDataContextMenu = $(tr).contextMenu('AcctVisitStatusDataContextMenu',
        {
            menuStyle:
                        {
                            width: 'auto'
                        },
            bindings:
                        {
                            'MenuNewAcctVisitStatus': function (t) {
                              // debugger;
                                openDialog('N');
                            },
                            'MenuEditAcctVisitStatus': function (t) {
                                 //debugger;
                                openDialog('E');
                            }
                        }
        });
        }
   });
    }
}

I am not able to display the context menu?? How to solve this? 
For the above case where i just want to display context menu on right click on grid.
Daniel
Telerik team
 answered on 19 Apr 2013
1 answer
106 views
Hi,

Is there a way to distinguish the actions in the grid's databinding event or datasource's change event?

I want to listen for the group changing event to limit the maximum number grouping the user can do to 1.

Thanks
Dimiter Madjarov
Telerik team
 answered on 19 Apr 2013
5 answers
368 views
Hi,

Would it be possible to have a demo of Leaflet for Kendo UI mobile?

http://leaflet.cloudmade.com/examples/mobile.html

I suggest, the first page is listview and second page is the Leaflet map.

Thanks.


Petyo
Telerik team
 answered on 19 Apr 2013
1 answer
188 views
How I can use the "aggregates" in an listview? . If possible, how would I? 

I can see that in a grid itself can by the FooterTemplate property but the listview does not have that property.
 Thanks.
Iliana Dyankova
Telerik team
 answered on 19 Apr 2013
1 answer
419 views
I have a button at top that I wire up to do a filter reset.  I show that button whenever a filter is applied.  However in the columnMenu filter clear, it does clear the filtering of the data, but I need it to hide that button IF there are no more filters.  I am overriding the filter function with a custom filter

Questions:
1)  Is there a way to tie into the clear event that is fired from filterMenu to update certain UI elements?
2) Is there a way to identify if ANY filter is on a grid since the filter function loops through column by column and I want to know if ANY filter is applied?

Thanks.

-John-
Dimiter Madjarov
Telerik team
 answered on 19 Apr 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
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?