Telerik Forums
UI for Blazor Forum
0 answers
112 views

Hello, we have a strange behavior in the scheduler.

When first called up, the appointments in the timeline are displayed correctly in the order of their resource. (The text in the appointment corresponds to the id of the resource.)

If you switch the scheduler view to day and then back to timeline, everything is still displayed correctly.

However, if you switch to the weekly or monthly view and then back to the timeline, some of the appointments shift down by about 250px and end up in the wrong resource or no resource at all.

Helmut
Top achievements
Rank 1
Iron
 asked on 22 Aug 2023
1 answer
423 views

I am using the TelerikPanelBar with only 1 item to create a collapsible form.
Is it possible to control the color and background color of the HeaderTemplate.

  <TelerikPanelBar Data="@Model"
    ExpandedItems="@Model">

    <PanelBarBindings>

      <PanelBarBinding>

        <HeaderTemplate>
          <h4>Filters</h4>
        </HeaderTemplate>

      </PanelBarBinding>

    </PanelBarBindings>

  </TelerikPanelBar>

Hristian Stefanov
Telerik team
 answered on 22 Aug 2023
0 answers
242 views

I have a simple TelerikGrid within a blazored modal:


<TelerikGrid Data="this.Model"                 
             Height="400px">
    <GridColumns>
        <GridColumn Field="Id" Width="30px" Title="Id" />
        <GridColumn Field="Name" Title="Name" />
        <GridColumn Field="RoleId" Width="30px" Title="SRRid" />
    </GridColumns>
</TelerikGrid>

when I load the information I get 50 records, due to the modal size I can only see 15 records, however the vertical scrollbar is not being displayed.

Am I missing something else that I need to configure?

 

 

Alberto
Top achievements
Rank 1
 asked on 22 Aug 2023
1 answer
228 views

Good morning. In my code I've seen that AutoFitAllColumnsAsync works only from the second time on. I'm asking you if I'm missing something or doing something wrong.

Follows 2 repl link:

in the first one when you click on the upper button to load data, the data are loaded and then AutoFitAllColumnsAsync is called twice and works: https://blazorrepl.telerik.com/GxkiFivl46gBfE8o57

in the second one when you click on the upper button to load data, the data are loaded and then AutoFitAllColumnsAsync is called only once and doesn't work: https://blazorrepl.telerik.com/wdEsbsPF50K99GvR04

Please note that in the second example if you click again on the load data button the AutoFitAllColumnsAsync is correctly applied (in other words, in my examples AutoFitAllColumnsAsync works only from the second time on).

Please let me know if I have to change something in code. Thank you.

 

 

Dimo
Telerik team
 answered on 21 Aug 2023
1 answer
173 views

I have a Blazor server application that is displaying a Gantt control. For several of my users with smaller screen sizes they have noticed that the Tree and Timeline can get out of sync vertically. When scrolling the Tree stops and the Timeline keeps going:

I have also observed that resizing the browser window can result in differences in height of the Tree and Timeline:

Svetoslav Dimitrov
Telerik team
 answered on 18 Aug 2023
1 answer
228 views

Hello,

I'm trying to use the FileSelect control in my Blazor server-side app to allow users to upload one or more files to an S3 bucket. I don't want to upload them individually upon select, the requirement is they can select multiple files several times.  As such I have a separate "Upload" button that calls an event which will kick off the upload.

My goal is to send the file streams to a javascript function so that I can upload them through the user's browser to S3 (using generated pre-signed URLs that DO get created on select). The problem I'm running into is that the Streams are already disposed of after the Select event is done.

I was originally trying to do this with the TelerikUpload control, but that seems geared to sending to an API, and I'm trying to avoid proxying the files internally so I don't have to have the user send files to an internal API and then the API sending them on to S3. 

Are there any examples of what I'm trying to accomplish? Does it even seem possible?

Thanks!
Bill

Dimo
Telerik team
 answered on 18 Aug 2023
1 answer
429 views

I have a Telerik Dialog:

 

@using Telerik.Blazor.Components
<TelerikDialog @bind-Visible="@Visible" Width="320px" Title="Submit the page">
    <DialogContent>
        <div id="dialog-form-fileupload">
            <div id="divMessagesFile" class="en-form-row en-message-warning">
            </div>
            <div class="col-md-12">
                <div class="form-group">
                    <InputFile OnChange="@LoadFiles">
                    </InputFile>
                </div>
                <div class="form-group">
                    <label>Documentsoort</label>
                    <div>
                        <TelerikDropDownList Data="@DocumentTypes" TextField="Value" ValueField="Key" @bind-Value="@DocumentType" @ref="@DocumentTypesRef"
                                             OnChange="OnDocumentTypeChanged"></TelerikDropDownList>
                    </div>
                    <div><span>@IsEnabled</span></div>
                </div>
                <div class="form-group">
                    <label>Meesturen naar aannemer</label>
                    <div class="form-check form-check-inline">
                        <TelerikCheckBox id="send-to-contractor" class="form-check-input" @bind-Value="@SentToContractor" Enabled="@IsEnabled" @ref="@SentToContractorRef" />
                    </div>
                </div>

            </div>
        </div>
    </DialogContent>
    <DialogButtons>
        <TelerikButton ButtonType="@ButtonType.Button" class="btn btn-primary ms-2" OnClick="@Save">Opslaan</TelerikButton>
        <TelerikButton ButtonType="@ButtonType.Button" class="btn btn-primary ms-2" OnClick="@Cancel">Annuleren</TelerikButton>
    </DialogButtons>
</TelerikDialog>

 

My problem is with the TelerikDropDownList and the TelerikCheckBox. In my OnDocumentTypeChanged I want to check/unchech and enable/disable the chekbox depending from the selected item in de dropdownlist.

I tried many ways but the checkbox did not change, i even put a span with the value of the IsEnabled, and also that didn't change.

However when I close the popup, and open it again, the values are correctly set
THis is the "close"function

private void Cancel()
    {
        Visible = false;
    }

These are the OnDocumentTypeChanged functions I used but did not work

 public void OnDocumentTypeChanged(object newValue)
    {
        var selectedItem = DocumentTypes.FirstOrDefault(item => item.Key == newValue as string);
        if (selectedItem != null)
        {
            IsEnabled = selectedItem.OpdrachtberichtWijzigbaar;
            SentToContractor = selectedItem.Opdrachtbericht;          
        }
        StateHasChanged();
    }

public async Task OnDocumentTypeChanged(object newValue)
    {
        var selectedItem = DocumentTypes.FirstOrDefault(item => item.Key == newValue as string);
        if (selectedItem != null)
        {
            IsEnabled = selectedItem.OpdrachtberichtWijzigbaar;
            SentToContractor = selectedItem.Opdrachtbericht;          
        }
        await InvokeAsync(StateHasChanged);

         return Task.CompletedTask;

    }

public async Task OnDocumentTypeChanged(object newValue)
    {
        var selectedItem = DocumentTypes.FirstOrDefault(item => item.Key == newValue as string);
        if (selectedItem != null)
        {
            await InvokeAsync(() =>
            {
                IsEnabled = selectedItem.OpdrachtberichtWijzigbaar;
                SentToContractor = selectedItem.Opdrachtbericht;
            });

            // Trigger a UI update
            StateHasChanged();
        }
    }

 

But I always get the same resutl, the checkbox' state is not changed only when i close the dialog and reopen it.

I also tried to close the dialog within the OnDocumentTypeChanged, by putting Visible = false; in it

And strangely, that did work, ANyone knows what I did wrong?

Hristian Stefanov
Telerik team
 answered on 17 Aug 2023
1 answer
324 views

Hi

We render a lot of charts with different sets of categories. We display the labels vertically and at an angle. Some have shorter names than others. This can make the charts appear differently and also move around as the label area expands and contracts. I will include an example picture.

Is a parameter like the Height parameter of ChartLegend available? I have not been able to find it so far. If I have missed it could someone point me in the right direction.

Just for context we have also:

  • truncated long names to certain lengths.
  • Attempted work arounds with padding vs label length but without a monospace font it is irregular

Thanks

 

Svetoslav Dimitrov
Telerik team
 answered on 17 Aug 2023
1 answer
197 views

Hello,

I would like to visualize moving objects on the map using Marker Layer on TelerikMap. The problem I have is that each refresh on the map resets the Center and Zoom parameters of the map to initial position. If I omit the Center and Zoom parameters of TelerikMap and initially manually zoom to my desired position - all works as expected. The user can move his view point on any place and observe the passing markers without reset to the starting view point. How can I set only initial zoom and center?

 


            <TelerikMap Height="300px" Center="@_center" Zoom="_zoom" @ref="_map">
                <MapLayers>
                    <MapLayer Type="@MapLayersType.Tile"
                              Attribution="@Attribution"
                              Subdomains="@Subdomains"
                              UrlTemplate="@UrlTemplate">
                    </MapLayer>

                    <MapLayer Type="MapLayersType.Marker"
                              Data="@_positions"
                              LocationField="@nameof(DeviceOnMap.LatLng)"
                              TitleField="@nameof(DeviceOnMap.Imei)" />
                </MapLayers>
            </TelerikMap>

    private async Task _moveTargets(CancellationToken token)
    {
        foreach (var report in reports)
        {
            double[] position = new double[] { report.Location.Coordinate.Y, report.Location.Coordinate.X };
            var device = _positions.Find(x => x.Imei == report.Device.Imei);
            if (device != null)
            {
                device.LatLng = position;
            }
            else
            {
                _positions.Add(new() { Imei = report.Device.Imei, LatLng = position });
            }
            await InvokeAsync(StateHasChanged);
            await Task.Delay(200, token);
        }
    }


Plamen
Top achievements
Rank 1
Iron
 answered on 16 Aug 2023
1 answer
520 views

I have a grid that has a couple of dateonly fields.  There can be dates or null for the data supplying the information.  Which ends up looking like this:

 

I would rather see blank than 1/1/0001, but I am not sure how to do this.

Here is the code for the grid:


<TelerikGrid TItem="EngineModel"
             Data="@EngineShowList"
             EditMode="@GridEditMode.Inline"
             OnEdit="@EditHandler"
             OnUpdate="@UpdateHandler"             
             @ref="@Grid">

      <GridColumns>
        <GridColumn Field="ProductionLine.EffectiveGuid" Title="EffectiveGuid" FieldType="@typeof(Guid)"     Editable="false" Visible="false" />
        <GridColumn Field="ProductionLine.EffectiveFrom" Title="From" FieldType="@typeof(DateOnly)" Editable="true" Width="20%">
            <EditorTemplate>
                <TelerikDatePicker Id="EffFromDate"
                    @bind-Value="@SelectedFromDate"
                    DebounceDelay="250"
                    Min="@Min"
                    Max="@Max">
                </TelerikDatePicker>
            </EditorTemplate>
        </GridColumn>

 

How would I get the display to just show blank for 1/1/0001?

 

Thanks!

Hristian Stefanov
Telerik team
 answered on 15 Aug 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
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
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?