QueryableExtensions.ToDataSourceResult throws IndexOutOfRangeException if a DataTable contains deleted rows.
using System.Data;
using Telerik.DataSource;
using Telerik.DataSource.Extensions;
var dt = GetData();
var res = dt.ToDataSourceResult(new DataSourceRequest());
DataTable GetData()
{
DataTable table = new DataTable();
// Make sure you specify the correct types
// If you have any nulls in your (database) Column, you should use nullable type (int?, DateTime?,...)
table.Columns.Add("ProductId", typeof(int));
table.Columns.Add("ProductName", typeof(string));
table.Columns.Add("UnitPrice", typeof(decimal));
table.Columns.Add("UnitsInStock", typeof(short));
// You should set default values to the columns that could be skipped in Create/Edit.
// The alternative approach is to set the default values in the UpdateHandler and/or CreateHandler.
// Having a default value in this case will prevent having DBNull values in your DataTable, because
// DBNull is not parsable to any other primitive type and if you pass it to the grid, some of the operations could be broken
table.Columns["ProductName"].DefaultValue = default(string);
table.Columns["UnitPrice"].DefaultValue = default(decimal);
table.Columns["UnitsInStock"].DefaultValue = default(short);
for (int i = 1; i < 50; i++)
{
table.Rows.Add(i, $"Product{i}", i * 5.2, i * 2);
}
table.AcceptChanges();
var lastRow = table.Rows[table.Rows.Count - 1];
lastRow.Delete();
return table;
}
Create a general purpose component to allow dragging and dropping of other components or files from the filesystem. Expose events that let us get access to the files that were dropped so that we can access the contents of those files or send them off to be uploaded.
Currently in Blazor we can do this with the InputFile component. But I would like the ability to create a droppable UI and have any kind of child content in it. And also get at the file content of files dropped.
Hi,
I had to figure this out myself for the ComboBoxSettings because there is no documentation for this.
The MinWidth works from the Combobox width or greater extending the size of the popup and
MaxWidth only creates a popup width of the Combobox only.
Please document this feature and how to use it. And, is this intentional because it wasn't intuitive for me to figure out.
I created a REPL for you to test this out for yourself.
Hello,
I would love to see an auto sizing for a TileLayoutItem. Specifically, in my case, the RowSpan. I feel like this would make a great addition as a parameter in the future as (also AutoSizeColumn would be nice)
<TileLayoutItem AutoSizeRow="true"></TileLayoutItem>
I am working on an application that has dynamic data displayed within the TileLayoutItem. In my current implementation, I'm going through a process of attempting to calculate for resizing the RowSpan. The calculations are based on an inner body div that holds an id, finds the parent k-tilelayout-item and then the the k-tilelayout itself. I can't positively say my math is perfect but it (mostly) gets the job done. Keeping in mind that I have created other altered other areas of the TileLayout as well, specifically setting the TelerikTileLayout grid to autofit.
For an idea of what I am currently doing as a means of possibly finding a (better) way to implement this in the future, this is the long ugly javascript code I have that is used to gather a minimum size and return it to blazor via JsInterop.
function (tileId, minSpanSize = 4) {
try {
var el = document.getElementById(tileId);
var tileLayout = $(el).closest(".k-tilelayout")[0];
var parentTile = $(el).closest(".k-tilelayout-item")[0];
var headerHeight = $(el).parent().siblings(".k-tilelayout-item-header")[0].offsetHeight;
var parentSpan = parseInt(parentTile.style.gridRowEnd.split("span ")[1]);
var gap = parseInt(tileLayout.style.gap.replace("px", ""));
var rowHeight = parseInt(tileLayout.style.gridAutoRows.split(",")[1].split("px")[0]);
// cannot recall where I got 1.25 from
var minSize = Math.ceil((headerHeight + el.offsetHeight) / ((gap / 1.25) + rowHeight));
// if parent is less than minsize
if (parentSpan < minSize) {
parentTile.style.gridRowEnd = "span " + minSize;
return { id: tileId, minSize: minSize };
// Otherwise, if min size is greater than or equal to minSpanSie
} else if (minSize >= minSpanSize) {
parentTile.style.gridRowEnd = "span " + minSize;
return { id: tileId, minSize: minSize };
}
} catch { }
return { id: tileId, minSize: -1 };
The File Manager (exactly like https://www.telerik.com/aspnet-core-ui/file-manager) for Blazor is needed.
I see there is the File Select Blazor FileSelect Component | Telerik UI for Blazor, but not File Manager that is a more complete and richer control.
Hi,
I need the older version of CSS (2.9.0) for Blazor for telerik. I visited the site as follows but get error:
https://blazor.cdn.telerik.com/blazor/2.9.0/kendo-theme-default/all.css
Sorry, the page you are looking for is currently unavailable.
Find CSS until 2.22.0. the following link works
https://blazor.cdn.telerik.com/blazor/2.22.0/kendo-theme-default/all.css
Could you fix the link or please provide me the CSS for 2.9.0 ASAP.
Regards
Shuvra
Hi Team,
We are using Telerik Modal popup on the GridView edit click button.
This Modal Window moves out of the screen when user clicks on popup header click when there is a vertical page scrollbar and the scroll position is not top.
Can you please fix this bug? We implemented your workaround, but using that workaround with below link, after opening the popup, below screen automatically scrolls on top. This is not good user experience on lengthy page.
Expectation : Page scroll should stay with the previous position after opening the popup with scrollbar.
Thanks,
Aarti Tare
Hi I was wondering if there is a way for us to have the functionality of CloseOnOverlayClick like on Dialogs for the Create/Edit Popup in the TelerikGrid?
I can't seem to find the option within the TelerikGrid -> GridSettings -> GridPopupEditSettings component
Thanks,
Daniel
Hi good morning. I am implementing a FileManager control, but by business logic only certain users have permission to rename files. So in the onEdit method I validate the permission and if it doesn't have it I send a DialogFactory and after that I send an args.IsCancelled = true. And at the end of the event if I click on another item (file) inside the folder. throw an exception:
public async Task OnEdit(FileManagerEditEventArgs args) { Dialogs.AlertAsync(message, "FileManager"); args.IsCancelled = true; }
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Blazor.Extensions.ReflectionExtensions.GetPropertyValue(Object target, String propertyName)
at Telerik.Blazor.Components.TelerikFileManager`1[[XXX.WASM.Shared.HierarchicalFileEntry, XXX.WASM.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ConvertToFileEntry(Object dataItem)
at Telerik.Blazor.Components.FileManager.FileView.FileManagerFileViewBase`1[[XXX.WASM.Shared.HierarchicalFileEntry, XXX.WASM.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ConvertToFileEntry(Object dataItem)
at Telerik.Blazor.Components.FileManager.FileView.FileManagerListFileView`1.<>c__DisplayClass17_2[[XXX.WASM.Shared.HierarchicalFileEntry, XXX.WASM.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<BuildRenderTree>b__8(RenderTreeBuilder __builder3)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at Telerik.Blazor.Components.ListView.ListViewItem`1[[XXX.WASM.Shared.HierarchicalFileEntry, XXX.WASM.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<BuildRenderTree>b__17_0(RenderTreeBuilder __builder2)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at Microsoft.AspNetCore.Components.CascadingValue`1[[Telerik.Blazor.Components.ListView.IListViewCommandContainer, Telerik.Blazor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8]].Render(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
Hi. VS 2022 version 17.2.4, C#, Windows 11
I thought I'd have a look at blazor and selected the Telerik version in the new projects window and ran through the wizard.
I selected the dashboard look, .net 6, teleric UI for blazor 3.4.0 (Dev) and to enable localization, which is what I assume to be the cause of the following error message. There were no other hints and as I've never tried blazor or telerik for
blazor I don't know if there's anything missing from the solution. If I ran another wizard without localization there was no error.
An error occurred while running the wizard.
Error executing custom action Telerik.Blazor.VSX.Actions.CopyBlazorLocalizationResourcesAction: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Telerik.Blazor.VSX.Actions.CopyBlazorLocalizationResourcesAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap project)
at Telerik.VSX.WizardEngine.ActionManager.ExecActions()
Just Moving from Ajax UI to Blazor
Used the search box a lot - multi-columns, had first match as typed toward an item,filtering, a click return the item selected
Wonderful
please can we have a blazor version?
Nick
To be considered for implementation as a standalone component or feature of ListView, for example.
The purpose of such component is to provide option for users to reveal contextual actions when they do a swipe gesture on mobile devices. The swiping direction to consider is left and right (up and down are out of scope).
List of possible functionalities for consideration:
Please feel free to provide any feedback and share your suggestions on desired functionalities.
I would like to be able to change the multiselect tags, mainly colors, forground and background, of both dropdown elements (shown in list) and selected values shown in textbox like the image bellow
When user click into the date picker textbox, the placeholder value is changed to what's set to "format" for the date picker. For example, I have the following configured:
<TelerikTimePicker Placeholder="dd/mm/yyyy" Format="dd/MM/yyyy"></TelerikTimePicker>
The control will display "dd/mm/yyy" in the textbox, however, when user click into the textbox, the placeholder value changes to "dd/MM/yyyy".
It seems I'm missing Height, MinHeight, and MaxHeight settings here.
Below issue was submitted 6 days ago. Currently developers are disabling/uninstalling Telerik extensions. I don't see any relies from Telerik so submitting another bug report hoping you'll reply to this one.
Please fix it!!!
Telerik UI for Blazor 3.6.0 breaks intellisense/typing in Visual Studio 2022 Version 17.3.4
I need to track users activity per day like this, it is possible to do with any of the current components scheduler timeline? can you provide such option/component?
Need to include different colors in the bar. We were using google charts timeline but it is discontinued.
I would really like to see a flyout control. Something like the below
This would allow me to attach a popup dialog to a control instead of just doing a dialog at the center of the screen.