Telerik Forums
UI for Blazor Forum
1 answer
1.1K+ views

Hi,

I am using Telerikgrid to display the data which I am loading from database.

At a time there can be only couple of 100 records return from database. There is no custom formatting or any calculation when loading the data in the grid. I am not using the paging.

I am still seeing the records are loading in the grid very slowly.

What can be done to improve the performance?

Thanks & regards,

Afreen

 

Dimo
Telerik team
 answered on 20 Apr 2023
1 answer
714 views

Hi,

 

I am using the Telerikgrid in my code to display the data. I have also implemented the SelectedItemsChanged  event to handle and updating a value in the IEnumerable list. The problem which I am facing is the following:

When I am checking or unchecking the TelerikgridCheckboxColumn the SelectedItemsChanged  event is firing only on the items which are displaying on the current page not the entire list. 

I want this event should fire for all the items in the list not just on the current page.

Can you please help to fix this issue? Do I need to set some property of the Telerikgrid?

 

Thanks,

Afreen

Dimo
Telerik team
 answered on 20 Apr 2023
7 answers
2.5K+ views

I am using Telerik.UI.for.Blazor version 4.1.0. I recently cleared my nuget cache, and started getting the error noted below. I have already followed the procedure to clear nuget cache and re-install Telerik.UI.for.Blazor, but I keep getting this build error. This is happening on pages that are using Grid, at line: 




var datasourceResult = folderStructure.ToDataSourceResult(args.Request);

error CS0012: The type 'DataSourceRequest' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.DataSource, Version=2.1.3.0, Culture=neutral, PublicKeyToken=29ac1a93ec063d92'.


Dimo
Telerik team
 updated answer on 19 Apr 2023
0 answers
483 views

I have followed the example here to bind the grid to a data table:  Bind to DataTable (telerik.com)

Everything seems to work fine, but the searching functionality.  Is there something special I have to make that work?

 

<TelerikGrid Data=@GridData.AsEnumerable() TItem="DataRow"
             Pageable="true"
             Sortable="true"
             Resizable="true"
             FilterMode="@GridFilterMode.None" 
             @bind-PageSize="@PageSize">
    <GridSettings>
        <GridPagerSettings InputType="PagerInputType.Input"
                           PageSizes="@AppSettings.PageSizes"
                           ButtonCount="5"
                           Adaptive="true">
        </GridPagerSettings>
    </GridSettings>
    <GridExport>
        <GridExcelExport AllPages="@true" />
    </GridExport>
    <GridToolBarTemplate>
        <GridCommandButton Command="custom" Icon="@FontIcon.MaxWidth" Size="sm" OnClick="@AutoFitAllColumns">Auto-fit</GridCommandButton>
        <span class="k-toolbar-spacer"></span>
        <GridCommandButton Command="ExcelExport" Icon="@FontIcon.FileExcel" Size="sm">To Excel</GridCommandButton>
        <span title="Searches the items in the below grid." class="tooltip">
            <GridSearchBox DebounceDelay="200" Placeholder="Search" Size="sm"></GridSearchBox>
        </span>
    </GridToolBarTemplate>
    <GridColumns>
        @foreach (DataColumn col in GridData.Columns)
        {
            <GridColumn Field="@col.ColumnName" Title="@col.ColumnName">
                <Template>
                    @((context as DataRow).ItemArray[col.Ordinal].ToString())
                </Template>
            </GridColumn>
        }
        <GridColumn Field="@nameof(RawDataVm.SearchString)" Title="" Width="1%" ShowFilterCellButtons="false" OnCellRender="@((e) => e.Class = "merge-border")">
            <Template>
                @("")
            </Template>
        </GridColumn>
    </GridColumns>
</TelerikGrid>

 

Also, the private TelerikGrid<DataRow> Grid { get; set; } = null!; declaration seems to be null, should it be a different object type?

 

 

Eric
Top achievements
Rank 2
Iron
Iron
 asked on 18 Apr 2023
1 answer
504 views

This might not be the correct place to ask this, but you all have been so much help the past that I figured I'd ask here.

I'm running into a brand new issue where connecting to SignalR in debug(localhost) is no longer working, but the odd part is that everything works just fine in production.

 

My code (red arrow is where it fails):

The error:

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.IO.IOException: The request was aborted. ---> System.IO.IOException: The response ended prematurely while waiting for the next frame from the server. at System.Net.Http.Http2Connection.<ReadFrameAsync>g__ThrowMissingFrame|69_1() at System.Net.Http.Http2Connection.ReadFrameAsync(Boolean initialFrame) at System.Net.Http.Http2Connection.ProcessIncomingFramesAsync() --- End of inner exception stack trace --- at System.Net.Http.Http2Connection.ThrowRequestAborted(Exception innerException) at System.Net.Http.Http2Connection.Http2Stream.CheckResponseBodyState() at System.Net.Http.Http2Connection.Http2Stream.TryEnsureHeaders() at System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync(CancellationToken cancellationToken) at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.Internal.AccessTokenHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.Internal.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncInner(CancellationToken cancellationToken) at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken) at HammertimeApp.Pages.TelerikLayout.GetConnection() 

 

Since I am using SignalR to refresh user data in a large portion of my app, I'm currently at a standstill with debugging any new errors.

Any help would be greatly appreciated! 

-Dustin

 

Dustin
Top achievements
Rank 2
Iron
Iron
 answered on 18 Apr 2023
1 answer
118 views

I am trying to create a break time control using the Telerik Grid and Timepicker controls.  I set the break start values Min is the schedule series start time. and Max is the schedule series end time.  So setting the break start timepicker Min and Max properties correlate to this schedule time frame to keep the break time within the bounds of the schedule. 

When I set break end I want the range in the timepicker to reflect break start to schedule end.  For example:

I have a schedule that starts at 0600 and ends at 1430. 

My first break I choose the start time 0800 from the range of 0600 to 1430.  I want to set the break end time to be chosen from a range of 0800 to 0900. In the image the Break End shows the time range of 0600 to 1430...  So basically I want to have the break end range be from the break start time set.

in short

  • When adding a new Break, the START time should pre-populate with the Scheduled Events actual starting time.  Example: First Shift is from 7:00 AM to 2:30 PM.  When adding a new Break, the start time should pre-populate as 7:00 AM.
  • When you add a new Break and change the START time, it should automatically adjust the END time to at least the same START time + 15 or 30 or xxx minutes.

 

I have tried using the events for the Timepicker to help with this, but I can never get it to update.  Is there a way to achieve this? 

Razor code:

<TelerikGrid Data="@Appointment.Breaks"
	EditMode="GridEditMode.Inline"
	OnCreate="@CreateHandler"
	OnDelete="@DeleteHandler"
	OnUpdate="@UpdateHandler" 
	>
	<GridToolBar>
		<GridCommandButton Command="Add" Icon="add">Add</GridCommandButton>
	</GridToolBar>
	<GridColumns>
		<GridColumn Field="Description" Title="Description" FieldType="@typeof(string)" Width="50%" />
		<GridColumn Field="BreakStart"  Title="Break Start" FieldType="@typeof(DateTime)" DisplayFormat="{0:hh:mm:ss tt}" Width="150px">
			<EditorTemplate>
				@{
					var BreakToEdit = context as Break;

					<TelerikTimePicker Format="hh:mm:ss tt"
						           @bind-Value="@BreakToEdit.BreakStart"
							   Id="timepickerstart"
							   DebounceDelay="@DebounceDelay"
							   Min="@Min" 
							   Max="@Max">
						<TimePickerSteps Minute="5"/>
					</TelerikTimePicker>
				}
			</EditorTemplate>
		</GridColumn>
		<GridColumn Field="BreakEnd" Title="Break End" FieldType="@typeof(DateTime)" DisplayFormat="{0:hh:mm:ss tt}" Width="150px" >
			<EditorTemplate>
				@{
					var BreakToEdit = context as Break;

					<TelerikTimePicker Format="hh:mm:ss tt"
							   @bind-Value="@BreakToEdit.BreakEnd"
							   Id="timepickerend"
							   DebounceDelay="@DebounceDelay"
							   Min="@Min"
							   Max="@Max" >
							<TimePickerSteps Minute="5"/>
					</TelerikTimePicker>
				}
			</EditorTemplate>
		</GridColumn>
		<GridCommandColumn Width="100px">
			<GridCommandButton Command="Edit"   Icon="edit"></GridCommandButton>
			<GridCommandButton Command="Save"   Icon="save" ShowInEdit="true" ></GridCommandButton>
			<GridCommandButton Command="Delete" Icon="delete"></GridCommandButton>
			<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true"></GridCommandButton>
		</GridCommandColumn>
	</GridColumns>
</TelerikGrid>

Tsvetomir
Telerik team
 answered on 17 Apr 2023
1 answer
275 views

Hello,

We have a Blazor Telerik Grid with DetailTemplate. One of the columns in Master/Parent is an editable column. The grid is set with "Incell" for property 'EditMode'.

Issue:-

When the editable column is clicked for editing, the entire grid row(with detail) is collapsed if the row is in expanded mode. Once editing is completed, the grid goes back to its previous state(expanded).

Editing parent column in collapsed mode, works without any issues.

Would like to know if I can keep the grid row in expanded mode while editing(ie. keep the  original state) if its in expanded state.

If not, is it the default behavior of hierarchy grid and how can it be overridden?

Note - Tried with OnEdit and OnRowClick events, but the collapse happens before the respective event handler call.

Thanks in advance !

Sreeni

Radko
Telerik team
 answered on 17 Apr 2023
0 answers
103 views

Is there a way to force adaptive rendering ?

We have a blazor app inside a maui build, and when built for windows app, it does not trigger adaptive rendering at the size we need.

Is there a way to force adaptive rendering on, or configure when it will switch ?

 

Richard
Top achievements
Rank 1
 asked on 16 Apr 2023
0 answers
175 views

Is there any way to alter/customize the TelerikFilter FilterFields to be able to set a Visible attribute or add a filter template to add your own code to be filtered by?

I have a grid that has a few dropdown list columns that need those values to be in the filter and I have some filterfields that i want to hide under certain conditions. From the documentation, I could not see a way that this is possible.

With grid columns I am able to set them visible true/false as well as add a FilterTemplate. I just want to know if its possible on a FilterField of a TelerikFilter? I only seem to be able to set the attributes Name, Label, and Type.

Thank you!

William
Top achievements
Rank 1
 asked on 14 Apr 2023
0 answers
91 views

When I have a page with a fixed width sidebar, and the pager is in the content area of the page, the adaptive rendering of the pager does not work correctly.   I would expect that as the screen size gets smaller, that the pager will start to drop off the page info and the page size dropdown.  However, it doesn't do this, and it creates a horizontal scrollbar across the page.  Here is a repl illustrating the issue:

https://blazorrepl.telerik.com/wxOIPSvd41wFZsZO20

In my troubleshooting, it looks like the adaptive code to drop off the page info and page size is done somewhere in javascript, and I can't find what logic is being used to set a display: none Style on those items.

What can be done to get this functionality to work when there is a sidebar layout?

 

Mike
Top achievements
Rank 1
Iron
Iron
 asked on 14 Apr 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?