Telerik Forums
Kendo UI for jQuery Forum
3 answers
385 views

Hi there,

 

I have this piece of code 

 

$("#dom_imp_doc_assigned_to").kendoAutoComplete({
        dataTextField: "dom_display_name", // The widget is bound to the "name" field
        dataSource: DOCMAN.USERS,
        valid: false,
        select: function (e) {
            var value = e.item.text()
            var returnOBJ = DOCMAN.USERS.filter(function (obj) {
                return obj.dom_display_name === value
            })[0]
            $('#dom_imp_doc_assigned_to_eid').val(returnOBJ.user_login_name)
            $('#dom_imp_doc_assigned_to_dpt').val(returnOBJ.dom_org_unit)

            this.options.valid = true

        }, dataBound: function (e) {
            console.log(" initAffectedDOCS DataBound ", e.sender.options.dataSource)

        }

    });

 

I get the Popup with the data some times and sometimes I don't get any Popup. Is there any way to find out why and what's causing this to happen. One other thing to note is that locally I have less data like 10-15 values but in production I have around 5000 values. The problem only happens in production.

 

 

Plamen Lazarov
Telerik team
 answered on 08 Jun 2015
1 answer
413 views

IE issue : focus is seen to the editable cell with the newly bind data, but when user tries to write '123', it will type '23'.

Thought reason : It shows the cell enable and editable, but internal focus might be on span or td element and with second character it gives focus to the textbox.

********************************

I have a kendo grid with 'in-cell' mode, with server side paging enabled. (Mvc Razor view).

.chstml file

Html.Kendo() ..............Read(read => read.Action("GetInvoiceDataForGrid", "InvoicingCommon")) //POC change

                                   .Batch(true).PageSize(5) 

 

Scenario (this works well in chrome and firefox, Issue with IE 10/11) :

I'm having 2 rows displayed in the grid, I click on one cell and give a tab key. This will execute change effect and make a server call and bind the grid.

Now, when the grid is bound the focus to lastly focus cell is lost. (as grid was bind with modified data).

I tried to store the focus element and refocus with below two approaches but they are having issue for IE (10/11) :

Approach 1

$("#myGrid").data('kendoGrid').editCell($("#myGrid").find('.k-grid-content tr:eq(0) td:eq(6)'));
Approach 2
$("#myGrid").find('.k-grid-content tr:eq(0) td:eq(6)').click();

 Please guide me to focus cell after grid bind, especially that can work in IE. (as above two approaches work in chrome/firefox).

 

Alexander Popov
Telerik team
 answered on 08 Jun 2015
1 answer
254 views

Hi,

We value the clearOnPromt and unmaskonPost much but it does not provide a simple solution for validating data before posting it. Is there any option to disable the mask getting stored in the model if you haven't completely filled in the textbox? (the _ character).

Its getting ugly without this option, I have multiple masked textboxes where the user don't have to fill in the mask completely but where i use the data to validate before posting. i.e. iban, swift and zip codes. I have to deal multiple times with the mask now.

Thx!

Georgi Krustev
Telerik team
 answered on 08 Jun 2015
1 answer
172 views

Is there any way to determine the type of event from a function callback? I assumed there'd be a type defined but that doesn't seem to be the case. So if I define data-init="init" on my view and had this js:

 

init:function(e){
console.log(e.type, e.view.id, e);
}

 

e.type is not defined. I tried inspecting the object and couldn't find a parameter for it.

Petyo
Telerik team
 answered on 08 Jun 2015
3 answers
722 views

Dear Telerik,

I am using a DateTimePicker control in a kendo window that I use multiple times to add details for new data row.

After I enter the first Date and Time 1/1/2013 9:00 I programaticly cleare the values bound to the control and the the value of the control itself. 

$("#dateTimeControl1").data("kendoDateTimePicker").value(null); Then when the user selects an new date the default hour selected is the previous hour selected before. Could you explane why this is happenning and how to over come it.

 I am using 2015 first qorter version  of the mvc wapper version.

Yours,

 

Ariel

Boyan Dimitrov
Telerik team
 answered on 08 Jun 2015
2 answers
336 views

Hi,

 I have an MVC site using Kendo that shows a popup window when a button is clicked.

This window has a textbox and another button. When the button is clicked another popup window is opened, so we now have 2 popup windows open.

The 2nd popup contains a grid and 2 hidden textboxes that are populated when an item is selected in the grid.

What needs to happen is:

When I submit the popup with the grid, I need to update the model and close it, but leave the parent popup open and populate the textbox with the content of one of the hidden textboxes.

My problem is:

I submit the child popup, but I cannot force the parent popup to stay open and update. I get errors if I call the popup directly and if I call the index the model is updated, but the parent popup is also closed.

 If anyone can understand what I have written, please help!?!?

Thanks,

Lee

Daniel
Telerik team
 answered on 08 Jun 2015
1 answer
91 views

Hello Telerik team

 I use Kendo UI grid MVC. My grid 2  "Price", "Quantity" select from . I want to create in Kendo UI grid "Total price" = Price*Quantity

- How to use Aggregates to create "Total price"

- I don't want to generate "Total price" column from SQL command.

 

Thank you

Alexander Popov
Telerik team
 answered on 08 Jun 2015
8 answers
424 views

I have a menu, which executes a JavaScript call on each item, rather than a link, which then makes an ajax call to update content on the page. This works, however after the menu item is clicked, the menu often stays open.

 

As the refresh isn't always instant (it's loading the reporting services report viewer, and then opening a report), it can look like the click hasn't registered.  How can I force the menu to close after it's been clicked?

 

The only method I can see is a close method, but that requires passing the menu name, something that the called function isn't going to know (and as the menu is dynamically built, the item name may not be unique either).

 

I have tried the CloseOnClick option, but this doesn't work.

 

 The menu definition is:-

 

@(Html.Kendo().Menu()
  .Name("menu") //The name of the menu is mandatory. It specifies the "id" attribute of the widget.
  .BindTo(Model, mappings =>
  {
      mappings.For<BI_II.Models.MenuItem>(binding => binding //define first level of menu
          .ItemDataBound((item, main) => //define mapping between menu item properties and the model properties
              {
                  item.Text = main.MenuName;
                  item.Url = main.FullLink;
                  item.ImageUrl = Url.Content("~/Images/") + main.MenuImage;
              })
          .Children(main => main.Children)); //define which property of the model contains the children
      mappings.For<BI_II.Models.MenuItem>(binding => binding
          .ItemDataBound((item, child) =>
          {
              item.Text = child.MenuName;
              item.Url = child.FullLink;
              item.ImageUrl = Url.Content("~/Images/") + child.MenuImage;
 
          }));
  })
          .HtmlAttributes(new { style = "font-size:x-small" })
           
           
 
)

Thanks

Petyo
Telerik team
 answered on 08 Jun 2015
2 answers
320 views
Hello,
I have a "selectedProject" property on a ViewModel. This property is initially defined as "null". Eventually, this property will be set to an instance of an object locally defined as kendo.data.Model, having an array of "users".

Now, I am adding the following:
<div data-template="row-user-info-template" data-bind="source: selectedProject.users"></div>

Initially the selectedProject is null and hence users is undefined. That's why I am getting this exception:
"Uncaught TypeError: undefined has no properties"

Any idea how to workaround this issue?

Thanks

Leandro
Top achievements
Rank 1
 answered on 05 Jun 2015
1 answer
111 views

In my grid, I'm working on Filter Multi Checkboxes. In the unique ajax call, I would like to return a simple array of strings, like the following:

data.OrgSelections.Select(o => o.CompanyName).Distinct().ToList()

But the js is expecting a full on data structure, e.g. with an array of {CompanyName: "Susie's Seashell Shop"}

When I look at the demo and the ajax response, it seems to be unnecessarily heavy with data that will never be used for the purpose of showing the distinct items (all other columns in the view model are included, complete with data). In other words, all the Unique ajax call should be interested in is the unique set of strings for the checkboxes, so why can't it just accept an array of strings?  Or.. is there a way to configure it to accept a simple array of strings and I just haven't found it yet? Or, is there a reason why you may need to send down the complete ViewModel data structure that I'm not yet realizing?

OK, so, I'm assuming (for the purpose of this post and in the interest of getting something working in the short term) there may not be a way to just send down a simple array of strings. How can I convert the above code to return an array of anonymous types with a single field, CompanyName? I know this is more of a generic C# question, but I'm drawing a blank right now.

Thanks,

--Ed

Ed
Top achievements
Rank 1
 answered on 05 Jun 2015
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?