Telerik Forums
UI for Blazor Forum
1 answer
382 views

The problem happens for "large" files. I re-produced it for files as small as 123,260 bytes (123 kilobytes!) even when FileSelect.MaxFileSize=223260 or MaxFileSize=int.MaxValue!

Is this by design in the FileSelect component to not support files greater than a hundred kilobytes, or am I doing something wrong? There is nothing in the documentation warning about such tiny file limits.

Update:

I can upload files of any size when I add this line to the code. It of course is a hack and the real problem is in the design of FileSelect and should be fixed there.

builder.Services.Configure<HubOptions>(options =>

{
options.MaximumReceiveMessageSize = null;

});

Was this setting enabled by the Telerik engineers who tested the control? Because it is not in the default VS project and anyone creating a vanilla VS project and using FileSelect will not be able to use it with anything > 10-20kb or so :/

Another problem: (sometimes?) even when the file is uploaded successfully using all-default code, the uploaded file cannot be re-written because it remains locked despite the upload process finishing successfully. There is a place in the Telerik code that is opening the destination file and NOT disposing it properly.

Hristian Stefanov
Telerik team
 answered on 01 Feb 2022
2 answers
1.6K+ views

Hi,

 

Where can we find an actual sample/example of how to use this to obtain a file from the stream? Something like

 

file.Stream.GetAllBytes()

 

throws an exception of not being implemented and so far we have not been able to get any other methods to work either.

 

Non of the demos here https://demos.telerik.com/blazor-ui/fileselect/overview seem to actually implement a file upload method, where the stream is used.  The validation demo does not even have server side validation. 

 

Thanks.

Hristian Stefanov
Telerik team
 answered on 01 Feb 2022
0 answers
120 views

I have some dates that are being translated into a different date in my C# from what is in the Component.

I have the below component (I've tried multiple different formats)

<TelerikDatePicker @bind-Value="@this.MyModel.DateOfService" Label="Date of Service" />

When entering the below dates, I get the following outputs.

Entered Date 1 = 11/15/2021

Date 1 Output in C# = 1/15/2021

{1/15/2021 12:11:00 AM} <- Notice the 11 is in the Minutes slot

----------------------

Entered Date 2 = 05/05/1955

Date 2 Output in C# = 1/5/1955

{1/5/1955 12:05:00 AM} <- Notice the 5 is in the Minutes slot

I'm not performing any translation of the dates.

The property is DateTime type and modeled directly to the property, yet it is not interpolating the dates correctly in these cases.

 

Telerik.UI.for.Blazor V 2.27

billy
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 31 Jan 2022
1 answer
1.0K+ views

Hi there, 

I'm new at telerik and I'm trying to use the grid component. 

unfortunately i keep getting this error:

 Unhandled exception rendering component: Could not find 'TelerikBlazor.initGrid' ('TelerikBlazor' was undefined).
      Error: Could not find 'TelerikBlazor.initGrid' ('TelerikBlazor' was undefined).

I have installed telerik.ui.for.blazor in both Client and Server projects. I have installed telerik.ui.for.blazor as i couldn't find anywhere in the documentation the specific packaged that needs to be installed in order to start using the components and I thought the aforementioned should be the right one. 

Please find below code inside the component:

 

<Telerik.Blazor.Components.TelerikGrid Data="@Books">
          <GridColumns>
               <Telerik.Blazor.Components.GridColumn Field="@nameof(Book.Name)"></Telerik.Blazor.Components.GridColumn>
           </GridColumns>
</Telerik.Blazor.Components.TelerikGrid>

 

Please note that using only <TelerikGrid></TelerikGrid> is not permitted by the project. 

Any help would be appreciated. Or if you could please specify which package needs to be installed (in case I have installed the wrong package)

Thank you very much.

 

Kind regards

n/a
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 31 Jan 2022
1 answer
181 views

Hello

 

We have only one filter option in our Grid in a FilterMenu.

The previous css is not working anymore after the update to version 3.0.0.

  .k-filter-menu-container .k-dropdown,
    .k-filter-menu-container .k-state-empty:nth-of-type(2n),
    .k-filter-menu-container .k-textbox:nth-of-type(2n),
    .k-filter-menu-container .k-datepicker:nth-of-type(2n+1),
    .k-filter-menu-container .k-numerictextbox:nth-of-type(2n) {
        display: none;
    }

        .k-filter-menu-container .k-dropdown:first-of-type {
            display: block;
        }

 

We have changed it to:

.k-filter-menu-container .k-dropdownlist,
.k-filter-menu-container .k-state-empty:nth-of-type(2n),
.k-filter-menu-container .k-textbox:nth-of-type(2n),
.k-filter-menu-container .k-datepicker:nth-of-type(2n+1),
.k-filter-menu-container .k-numerictextbox:nth-of-type(2n) {
    display: none;
}

.k-filter-menu-container .k-dropdownlist:first-of-type {
    display: inline-flex;
}

 

But that shows the wrong dropdownlist.

How can we fix that?

 

 

 

 

 

 

 

 

 

Dimo
Telerik team
 answered on 31 Jan 2022
1 answer
178 views

Hi

I have a huge project

I've tried to upgrade to 3.0 but stopped to work

InvalidOperationException: Object of type 'Telerik.Blazor.Components.TreeViewBinding' does not have a property matching the name 'ExpandedItems'

And similare because in textbox label not exist anymore

But: in the documentation I've not read that this property are obsolete

Or other property similar to substite

What is the problem ?? How can I convert the proj to 3.0 ??

Tnx

 

Dimo
Telerik team
 answered on 31 Jan 2022
2 answers
486 views

Hi, 

I use ListView with attached OnRead event handler to page and filter data at database level.

When the filter changed, I only called the read data event handler with the previously saved DataSourceRequest again which assigned the data to the bound list. Now I must use the eventargs properties, which is ok for paging but not for any other data-changing use case.

There is no Grid State like feature in ListView and binding the Data property is forbidden when using OnRead (at least it has no effect).

So, how to manually trigger OnRead in v3.0 ListView?

Hristian Stefanov
Telerik team
 answered on 31 Jan 2022
1 answer
377 views

Hello,

My team would like to create E2E tests in Cypress for the grids we use and we are wondering whether it's possible to set unique ID values on the filter row. Currently, these IDs are just GUID values and we couldn't find a way to modify them.

 

Kind regards,

Greg

Marin Bratanov
Telerik team
 answered on 30 Jan 2022
1 answer
121 views
I am using telerikcombobox inside telerikgridn as column. I need to show a value from db in the empty combobox on pageload. Can anyone please help me. Thank you
Marin Bratanov
Telerik team
 answered on 30 Jan 2022
1 answer
226 views

Hi,

 

I'm quite new with telerik and I'm facing a probleme.

A use the grid to follow the status of a property. These status is defined by an enum (it could have been a dictonary, anyway)

When I bind my Grid datasource, in there is an int field representing the enum status.

IE: 0=open, 1=Closed,...

So I've bound the enum to the comboox, TextField and ValueField displays the correct data but on load for example, i'm not able to use the @bind-Value to the correct row. even more, on runtime, if I change one combobox, every comboboxes changes their value

 

I don't see the solution

 


<TelerikGrid Data="@WorkingData" 
             Height="auto"
             Pageable="true" 
             Sortable="true" 
             PageSize=30
             Resizable="true" 
             EditMode="GridEditMode.Popup">
    <GridColumns>
        <GridColumn Field="@(nameof(Work.Status))" Title="Status" Editable=true >
            <Template>
                <TelerikComboBox Width="100%" Data="@comboData" TextField="Value" ValueField="Key" @bind-Value="@cbValue" ></TelerikComboBox>
            </Template>
        </GridColumn>
        
        <GridColumn Field="@(nameof(Work.Comment))"  Title="Comment" />
    </GridColumns>
</TelerikGrid>

@code
{
    enum TicketStatus
    {
        Open = 0,
        Close = 1,
        Planned = 2,    
        Canceled = 3
    }
    public class Work
    {
        public int Status { get; set; }
        public string Comment { get; set; }
    }

    private List<Work> WorkingData;
    private Dictionary<int, string> comboData;
    private int cbValue;

    protected override void OnInitialized()
    {
        base.OnInitialized();

        comboData = Enum.GetValues(typeof(TicketStatus)).Cast<Enum>().ToDictionary(t => (int)(object)t, t => t.ToString());

        WorkingData = new List<Work>
        {
            new Work{Status=1,Comment="My First property"},
            new Work{Status=3,Comment="My second property"},
            new Work{Status=2,Comment="My Third property"},
        };

        cbValue = 0;

    }
}

Does anyonce could help me

 

Regards;

Marin Bratanov
Telerik team
 answered on 30 Jan 2022
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?