Please see this sample code I have, I am trying to reload data from a remote server into the spreadsheet with every click of the button.
The issue is after clicking the search button a second time to fetch new data, the spreadsheet is appended with a new one.
What is the proper way to reload data into the spreadsheet?
Link to sample code
https://dojo.telerik.com/ewigOKam
In the change event, is there any way to get the underlying data item of the selected node?
For a treeview control we can get the data item with something like this in the select event:
var dataItem = myTree.dataItem(e.node);
However, there's no "node" attribute in the change event for DropDownTree.
How do we do this?
Found a bug in the current time picker when trying to clear a value out. Please see the dojo:
https://dojo.telerik.com/@rareddy/IWijojuf
Steps to reproduce the bug are on the page:
Click "Clear Time".
Then click the time icon to set a new time
The time control pops up. Immediately click "Set" with the default time controls chosen. "12:NaN PM" appears in the time selection and cannot be set to a valid time.
Hello,
I understand that Kendo UI uses eval calls in its internal template engine. Are there any plans to develop a workaround that support the rendering of Kendo UI widgets which comply with a strict Content Security Policy that omits the 'unsafe-eval' keyword from the 'script-src'?
Thank you for your time.
Hi, I follow the documentation about un-selecting an item in a treeview, like this:
ktv.select($());
After, if I call ".select()", there's no node returned. And, if I search for k-node-selected", there's also none.
BUT
the node with id "(id-of-treeview)_tv_active" is still there. And, because we used it for some query, we got errors.
When we create a treeview from a div called <div id="test"></div>
The selected node gets its ID set to id="test_tv_active".
First, I don't think you should use an "id" for that.
And, you can fix the "unselect" by also removing the id from that item when we un-select it.
Hello,
I will try to expain as best as I can, it's not straighforward issue.
In my project we had grids with virtual scrolling AND paging. As we know, this is not a good idea.
In order to fix that, I removed the paging, leaving only virtual scrolling. Following the best practices I could find, the grid height and row height are fixed:
.k-virtual-scrollable-wrap td { white-space: nowrap; }
.k-virtual-scrollable-wrap tr { height: 40px; }
Scrolling works great but the grid always has some empty space in the bottom (grid_empty_bottom.png). After some investigation, it seems the k-grid-content element is always rezised to less height than the specified height (grid_html.png).
The only way I could find to fix it is to, on dataBound event, to change grid's css to match the k-grid-content element height:
const groupingHeaderHeight = this.widgetElement.find('.k-grouping-header').outerHeight();
const columnHeaderHeight = this.widgetElement.find('.k-grid-header').outerHeight();
this.widgetElement.find('.k-grid-content').height((this.activeGridOptions.height as number) - groupingHeaderHeight - columnHeaderHeight);
For reference, the grid work with client side data, the data is fetched from the server and the dataSource is added to grid (grid.setDataSource method) after grid instantiation.
The grid is also filterable, sortable, groupable and reorderable.
I am using following code alongside multiple other inputs:
@(Html.Kendo().DropDownListFor(m => m.CountryId)
.HtmlAttributes(new { id = "CountryId" })
.OptionLabel("Select country")
.DataTextField("CountryName")
.DataValueField("CountryId")
.BindTo(UnityConfig.GetConfiguredContainer().Resolve<ISlViewModelBaseData>().GetCountries(SlLanguage.DefaultLanguageId))
.Enable(true)
)
@Html.ValidationMessageFor(m => m.CountryId)
Problem:
After sending the form without selecting any value from the list the dropdown box is bound, the form validation prevents from further action indicating an input error. That's fine.
But after selecting a value and resending the form, the dropdown value is set back to OptionLabel "Select country".
Inspecting with Fiddler reveals that the submitted form did not contain the field CountryId anymore.
Sending the form directly with a selected value works fine, thogh.
I assumed, that something on the post back after the sent invalid form went wrong but the response seems to be just fine.
Could this be a bug?
kind regards
Kay