Telerik Forums
UI for Blazor Forum
0 answers
160 views

Repro Steps:

Pick any example, even the default one in the documentation, and make its data type ObervableCollection, and all of a sudden the values of Sortable=@true on the Grid and rows get ignored.

This seems to be specific only to ObservableCollection. Even IReadOnlyList supports sorting just fine. There is nothing in the documentation mentioned about why ObservableCollection shouldn't support sorting.

If this is by design, please amend the documentation, otherwise please let us know if you're planning to fix it.

Thanks.

Alex
Top achievements
Rank 1
Iron
Iron
 asked on 21 Feb 2022
0 answers
286 views

https://blazorrepl.telerik.com/QmEGmFYM497yvJqU02

I can't get page up/down to work.

Arrow navigation works fine in the grid.

I stumbled on this when I was trying to expand on the grid searchbox.

I would like to implement this usecase

  1. User type a key shortcut I have implemented and the searchbox get focus (this I have implemented)
  2. user type something and the grid are filtered (works)
  3. user presses enter and the first row in the grid get focus ( Not sure how to set focus on a row in a filtered grid ) 
  4. user navigates to the desired row and use space to activate the row (this should also work out of the box)

Right now I don't use the Navigable property because of the issue with page up/down This has to be fixed first.

Then I would like some help with setting focus on the first filtered row. I found this article https://docs.telerik.com/blazor-ui/knowledge-base/grid-get-filtered-data

Maybe when the user presses ENTER I can use the ToDataSourceResult extension method and then take the first row and add it to the selected rows collection. Or are there a easier way to set focus on the first row of a filtered dataset?

Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 21 Feb 2022
1 answer
192 views

REPL

Makes it impossible to show e.g. error messages above a dialog.

Hristian Stefanov
Telerik team
 answered on 21 Feb 2022
2 answers
319 views


            <GridToolBar>
                <AuthorizeView Roles="DOMAIN\GROUP">
                    <Authorized>
                        <GridCommandButton Command="Add" Icon="add">Add Permission</GridCommandButton>
                    </Authorized>
                </AuthorizeView>
                <TelerikButton OnClick="@_reloadPermissions"
                       Enabled="@_reloadEnabled"
                       FillMode="@(ThemeConstants.Button.FillMode.Solid)"
                       Rounded="@(ThemeConstants.Button.Rounded.Full)"
                       Shape="@(ThemeConstants.Button.Shape.Square)"
                       ThemeColor="@(ThemeConstants.Button.ThemeColor.Primary)"
                       Size="Medium">
                    <TelerikIcon Icon="arrow-rotate-cw"/>
                </TelerikButton>
            </GridToolBar>

Instead I get this:

I want the second button to be a round "refresh" button.

Svetoslav Dimitrov
Telerik team
 answered on 21 Feb 2022
1 answer
318 views

1. How can I set the tooltip values to be always visible? (the 42%, 25% & 33%)

2. Is it possible to set the inner text, like this?  (50)


 

Marin Bratanov
Telerik team
 answered on 20 Feb 2022
0 answers
302 views

Why cam I getting this?

Ilan
Top achievements
Rank 1
Bronze
Iron
Veteran
 asked on 20 Feb 2022
0 answers
218 views

I'm suddenly getting null refs when I call Grid.SetState and I need more information on why.

User clicks Reset button:
await Grid.SetState(null);

And then I set a Default Sort

            var desiredState = new GridState<SearchDocumentItem>()
            {
                SortDescriptors = new List<SortDescriptor>()
                    {
                        new SortDescriptor { Member = member, SortDirection = dir }
                    }
            };

            if (Grid != null)
                await Grid.SetState(desiredState);

Jason
Top achievements
Rank 1
Iron
Veteran
 asked on 18 Feb 2022
2 answers
939 views

Hi guys,

In the following code snippet I'm using a HeaderTemplate for my grid. This is working like expected. However I want to use this header template on practically all my columns. Is there an easy way to extract the HeaderTemplate and use that on multiple columns by just setting the HeaderTemplate property? Or can I create some sort of custom GridColumn which has this template automatically implemented?

<GridColumn Field="OrderMetadata.CustomerReference">
    <HeaderTemplate>
        <label class="k-checkbox-label">
            <TelerikCheckBox ValueChanged="@((bool result) => OnColumnSelect(result, nameof(WarehouseDocumentListItem.OrderMetadata.CustomerReference)))" />
                Customer reference
        </label>
    </HeaderTemplate>
</GridColumn>

Thanks in advance!

Regards,

Guido

PondresDeveloper
Top achievements
Rank 1
Iron
 updated answer on 18 Feb 2022
1 answer
231 views

Hi,

I have some backend API calls that I have to run before I TelerikUpload some files, namely I have to collect a ticketid to assign to the documents.

Once I have my ticketid, I call UploadRef.UploadFiles() and add the ticketid to the request.  I appreciate that UploadFiles runs asynchronously but in my case, I need to wait and make sure all of the files are accepted and take some actions based on if all were successful or if there were failures.

I thought it was going to be really easy, but apparently I can't await for UploadRef.UploadFiles():

await UploadRef.UploadFiles() // nope

Instead I'm currently doing this and it works but feels kludgy:


        private int UploadSuccessCount {get; set;}
        private int UploadFailureCount {get; set;}

private async Task OnTelerikSuccessHandler(UploadSuccessEventArgs e) { UploadSuccessCount++; } private async Task OnTelerikErrorHandler(UploadErrorEventArgs e) { UploadFailureCount++; } private async Task<bool> WaitForFileUpload() { if(RequestModel.FileCount == 0) { return true; } int count = RequestModel.FileCount; UploadSuccessCount = 0; UploadFailureCount = 0; UploadRef.UploadFiles(); int processed = UploadSuccessCount + UploadFailureCount; while( processed < count ) { await Task.Delay(1000); processed = UploadSuccessCount + UploadFailureCount; } return UploadSuccessCount == count ? true : false; }


  • I think UploadRef ought to be able to get at least the count of files that are ready to upload.  In my case, there are some times that files are required.  Currently, I have to track the file count via events:

        private async Task OnTelerikSelectHandler(UploadSelectEventArgs e)
        {
            RequestModel.FileCount += e.Files.Count;
            StateHasChanged();
        }

        private async Task OnTelerikRemoveHandler(UploadEventArgs e)
        {
            int count = RequestModel.FileCount - e.Files.Count;
            if (count < 0 ) count = 0;
            RequestModel.FileCount = count;
            StateHasChanged();
        }

  • I would like to be able to wait for the uploads to complete, perhaps

await UploadRef.UploadFilesAsync();

Thoughts?

 

Svetoslav Dimitrov
Telerik team
 answered on 18 Feb 2022
1 answer
727 views

I have a Tile Layout with a TelerikButton in the HeaderTemplate and it does not fire unless I click on the button more that once.  This seems to have started with v3 of the controls.


			<TileLayoutItem ColSpan="13" RowSpan="12" Class="scrollableTile">
				<HeaderTemplate>
					<h5 class="k-card-title d-inline-block">Hours</h5>
					<TelerikButton Class="float-end" Icon="save" Title="Save" OnClick="SaveHoursAsync"></TelerikButton>
				</HeaderTemplate>
				<Content></Content></TileLayoutItem>

Marin Bratanov
Telerik team
 answered on 17 Feb 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?