Telerik Forums
UI for Blazor Forum
1 answer
267 views

Hello there 

I am using Telerik Grid

In Grid, I am using default FilterMode="GridFilterMode.FilterRow" for Filtering

but it does not display the proper value in the drop-down for Filtering

here is my code snippet


<TelerikGrid Data="@UsersSource" Height="400px"
                                 Pageable="true" PageSize="PaginationHelpers.PageSize"
                                 FilterMode="GridFilterMode.FilterRow"
                                 Resizable="true" Reorderable="true"
                                 OnRowClick="@OnRowClickHandler"
                                 SelectionMode="@GridSelectionMode.Multiple"
                                 @bind-SelectedItems="@SelectedUsers">
                        <GridColumns>
                            <GridCheckboxColumn />
                            <GridColumn Field="@(nameof(User.Name))" Title="@_translator["NameLabel"]" />
                            <GridColumn Field="@(nameof(User.Username))" Title="@_translator["UserNameLabel"]" />
                            <GridColumn Field="@(nameof(User.BirthDate))" Title="@_translator["DateOfBirthLabel"]" DisplayFormat="{0: MM/dd/yyyy}" />
                            <GridColumn Field="@(nameof(User.Role))" Title="@_translator["RoleLabel"]" />
                        </GridColumns>
                    </TelerikGrid>

the output is like this 

instead of 

Marin Bratanov
Telerik team
 answered on 15 Jan 2022
1 answer
216 views

I'm designing a grid that requests only the data for currently selected columns.  I'd like to drive this using the GridColumnMenu, but I need notification on the user selecting new columns so I can update the query and pull in new data.  Is there an event or other method I can detect which columns are currently enabled by the user?

 

 

Dimo
Telerik team
 updated answer on 14 Jan 2022
1 answer
589 views

Instead of having the user click on the expand/collapse button on the row, we want them to be able to click the entire row to expand/collapse the details template. We have implemented it like and that seems to be working, but it seems like there should be a better way to do this, perhaps even built in?

 


        async Task OnRowClickHandler(GridRowClickEventArgs args)
        {

            args.ShouldRender = true;

            int currentIndexOfItem = CorporateCustomerList.IndexOf(args.Item);
            if (currentIndexOfItem > -1)
            {
                var state = Grid.GetState();

                if(state.ExpandedRows.Contains(currentIndexOfItem))
                    state.ExpandedRows.Remove(currentIndexOfItem);
                else
                    state.ExpandedRows.Add(currentIndexOfItem);


                await Grid.SetState(state);



                
            }
        }

  
Nadezhda Tacheva
Telerik team
 answered on 14 Jan 2022
1 answer
216 views

The preview here:

https://docs.telerik.com/blazor-ui/knowledge-base/inputs-validation-child-component

...is not working.  I can get the binding to work when creating an item; but updating, I can't get the value to bind so it comes up with my selection showing.

 

Is two-way binding for that example working for anyone?

 

thanks!

Hristian Stefanov
Telerik team
 answered on 13 Jan 2022
4 answers
291 views

Hi everybody,

I'm trying to use the ColorPicker into my project but when I make a click on the ColorPickerGradientView I get the error bellow:

Is there a way to fix this issue?

Best regards,
Cipri

 

Ciprian Daniel
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 13 Jan 2022
2 answers
356 views

Hi,

When I edit a specific recurring appointment (not a series), it updates the appointment properly if I use drag-n-drop, but when I use the edit dialog it creates a new appointment in addition to the recurring one instead of directly updating the recurring appointment as in the drag-n-drop scenario. Is this normal?

Thanks,

--Andre

Nadezhda Tacheva
Telerik team
 answered on 12 Jan 2022
1 answer
757 views

I have a Combo Box that needs to be unit tested.   It autocompletes and populates a list of addresses utilizing services.  Currently this works perfect in the UI version and I am wanting to write unit tests which accomplish the following.

1.  Enter Full AddressTextin to the combo box 

2. List of  potential addresses populates via  a Mock Address Lookup Service (in this case only 1, because I am entering the full address).   

3.  Matching item is selected, and AddressID obtained.  

4.  ID is compared against expected Id.

I am currently using  BUnit tests, and I am unsure how to proceed with creating unit tests for this combo box that follow the above steps.

How do I trigger the "Blur" or setting the value after using the  .Input(addresstext) of the Element.

 

 

 

 

 

 

 

 

 

Svetoslav Dimitrov
Telerik team
 answered on 12 Jan 2022
1 answer
147 views

Hi,

I have defined a treelist as shown below. I followed the example in the demo. The only problem is that when I expand a row, all other rows that have an expand arrow next to them lose the arrow. The only way I can get them back is to refresh the page. I've attached a couple of screen shots.

What am I missing?

Thanks ... Ed

 


    protected async Task OnExpand(TreeListExpandEventArgs args)
        {
            var item = args.Item as ColorRMLotModel;

            if (item.Lot.HasChildren && !tvData.Any(x => x.Lot.ParentLotId == item.Lot.ColorRMLotId))
            {
                var items = GetKids(item.Lot.ColorRMLotId); ;
                tvData.AddRange(items);
            }
        }

  SelectionMode="@TreeListSelectionMode.Single" 
                        @ref="tlRef"
                         IdField="ColorRMLotId"
                         OnStateInit="((TreeListStateEventArgs<ColorRMLotModel> args) => OnStateInitHandler(args))"
                 
                         ColumnVirtualization="true"
                         ParentIdField="ParentLotId"
                         HasChildrenField="HasChildren"
                         Pageable="false"
                         
                         Reorderable="true"
                         Sortable="true"
                         FilterMode="@TreeListFilterMode.FilterMenu"
                         OnEdit="@((TreeListCommandEventArgs args) => OnEdit(args))"
                         OnExpand="@OnExpand"
                         Width="1250px"
                         Height ="650px"
                         Resizable="true">
            <TreeListToolBar>


Dimo
Telerik team
 answered on 12 Jan 2022
2 answers
604 views

I have a wizard that is defined like this:

    <TelerikWizard @bind-Value="step" Height="100%" Width="100%">
        <WizardSteps>
            <WizardStep Label="Information" OnChange="OnWizardStepChange">
                <Content>
                </Content>
            </WizardStep>
            @if (showMapping)
            {
                <WizardStep Label="Column Mapping" OnChange="OnWizardStepChange">
                    <Content>
                    </Content>
                </WizardStep>
            }
            @if (showPreview)
            {
                <WizardStep Label="Preview" OnChange="OnWizardStepChange">
                    <Content>
                    </Content>
                </WizardStep>
            }
            <WizardStep Label="Validation" OnChange="OnWizardStepChange">
                <Content>
                </Content>
            </WizardStep>
        </WizardSteps>
        <WizardButtons>
            @{
                var index = context;
                int lastStep = 3;
                if (!showMapping) { lastStep -= 1; }
                if (!showPreview) { lastStep -= 1; }

                if (index > 0)
                {
                    <TelerikButton ButtonType="ButtonType.Button" OnClick="@(() => step -= 1)">Previous</TelerikButton>
                }

                if (index < lastStep)
                {
                    <TelerikButton ButtonType="ButtonType.Button" OnClick="@(() => step += 1)">Next</TelerikButton>
                }

                if (index == lastStep)
                {
                    <TelerikButton ButtonType="ButtonType.Button" OnClick="@CreateImport">Import</TelerikButton>
                }
            }
        </WizardButtons>
    </TelerikWizard>

When I try to load the page, the Wizard is giving me the following error:

[12:06:18 WRN] Unhandled exception rendering component: Value cannot be null. (Parameter 'format')
System.ArgumentNullException: Value cannot be null. (Parameter 'format')
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at Telerik.Blazor.Components.TelerikWizard.get_PagerMessage()
   at Telerik.Blazor.Components.TelerikWizard.BuildRenderTree(RenderTreeBuilder __builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
I cannot figure out what I am doing wrong?

 

Thomas
Top achievements
Rank 1
Iron
 answered on 12 Jan 2022
1 answer
195 views

Hello,

I'm trying to implement my own dialog for creating appointments in a grouped scheduler. I use the OnEdit event for this. The event is called and the start and end are correctly specified in SchedulerEditEventArgs. Unfortunately I miss any reference to the resource of the clicked line.

Regards

Helmut


Nadezhda Tacheva
Telerik team
 answered on 11 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?