Telerik Forums
UI for Blazor Forum
0 answers
506 views

Hi,

 

I have a combobox loaded with databse values, and I want to set the selected value with the value of my selected record when I open my telerikwindow where my combobox is. Right now it doesn't work.

 

.razor

  <FormItem ColSpan="1">
                                        <Template>
                                            <label for="store-country" class="k-label k-form-label">Pays</label>
                                            <TelerikComboBox Data="@CountryList" TextField="DescFr" ValueField="Id" @bind-Value="@SelectedCountryId" Width="90%"></TelerikComboBox>
                                        </Template>
                                    </FormItem>

.cs

        public void StoreEdit(int storeSelected = 0)
        {
            SetDropDownList();

            if (storeSelected > 0)
            {
                store = storeService.ReadItem(storeSelected);
                SetSelectedValue(store);
            }
        }

        private void SetSelectedValue(RSS_BasicStoreNational store)
        {
            SelectedProvinceId = store.IDProvince;
            SelectedCountryId = store.IDCountry;
            SelectedRegionId = store.RegionID;
            SelectedDistChannelId = store.DistributionChannel;
            SelectedInStoreSystemCode = store.CodeInStoreSystem;
            SelectedStoreTypeId = store.StoreTypeID;
            SelectedLanguageCode = store.CodeLanguage;


            OpenDateTimePicker = store.OpeningDate != null ? store.OpeningDate.Value : DateTime.Today;
            if (store.ClosingDate != null)
                CloseDateTimePicker = store.ClosingDate;
        }

        private void SetDropDownList()
        {
            ProvinceList = storeService.GetProvinces();
            CountryList = storeService.GetCountries();
            RegionList = storeService.GetRegions();
            DistChannelList = storeService.GetDistChannels();
            InStoreSystemList = storeService.GetInStoreSystems();
            StoreTypeList = storeService.GetStoreTypes();
            LanguageList = storeService.GetLanguages();
        }

 

stephane
Top achievements
Rank 1
 asked on 09 Mar 2022
0 answers
131 views

Okay, this one is getting me frustrated.

One of the columns that I am retrieving from the database is formatted with HTML and looks like:

 

17 04 01<br />17 04 02<br />17 04 05<br />20 01 40

 

Now, when I use webForms, the items will display like this:

 

17 04 01

17 04 02

17 04 05

20 01 40

 

However, in blazor they display like:

 

17 04 01<br />17 04 02<br />17 04 05<br />20 01 40

 

How can I get them to display like they did in webforms?

 

I've even tried to split the string and then loop thru the results and I still cannot get them to display on separate lines.

 

 

aehlert
Top achievements
Rank 1
Veteran
 asked on 08 Mar 2022
1 answer
195 views

Hello,

I have a model to serve as data in a grid. Besides regular single field data, like strings and numbers etc, the model also contains a List of multiple subitems which need to be added to each row, in a cell. My grid would look like this:

FirstFieldName              SecondFieldName                 ListOfItemsField

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

DataForItemOne          DataForItemOne                     SubItemOneOfItemOne

                                                                                         SubItemTwoOfItemOne

                                                                                         SubItemThreeOfItemOne

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

DataForItemTwo          DataForItemTwo                     SubItemOneOfItemTwo

                                                                                         SubItemTwoOfItemTwo

                                                                                         SubItemThreeOfItemTwo

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

                              etc etc etc etc.

 

My question is: how am I able to add multiple values into a cell? As mentioned, the values belong to a List contained by the model. Each model in the table would have its own List of subitems.

Thank you very much.

Kind regards

Nadezhda Tacheva
Telerik team
 answered on 08 Mar 2022
1 answer
103 views

Hello. 
I'm wondering why the documentation examples in Form section: Automatic Generated Fields doesn't work.  I simply copy and paste the example in a clean Blazor project with Telerik for Blazor 3.0.0 and the compiler can't find the definition for FormEditorType.


I don't missing any reference even tried the full namespace that the API documentation indicate and I didn't find any comment that the property is deprecated.

Any ideas?


Regards.
Ludwig.

 

Nadezhda Tacheva
Telerik team
 answered on 08 Mar 2022
1 answer
244 views

Good morning all,

I'm taking a look to the new Filter component, recently added to Telerik UI for Blazor.

I'm using it to build conditions to send to a custom SQL Query generator which will build the where clauses mapping from the export of the filter component. You can see my previous question (edited after i figured out a way) here: 
https://www.telerik.com/forums/how-to-use-the-new-filter-component-to-create-an-sql-query

The main reason I'm writing you is because I need to add custom items in the list of operators.
Specifically to check an Item against a list, but it's irrelevant I just need an operator that would then be interpreted by the QueryBuilder, I don't need to integrate with other telerik components.

Can I extend some of Telerik classes to implement the functionality I need? Is there any way?

If this is possible in any other way, can you point me in the right direction?

 

Thank you very much

PS: I tagged this question as General Discussion as it seems like a "Filter" tag is not available yet.

Have a nice day!

 

FB


Thanks, have a nice day.

Joana
Telerik team
 answered on 08 Mar 2022
1 answer
250 views

I have 2 listviews on a single page.

On one the items are displayed in a single column... one per row.

On the second the items are displayed as a grid.  Per the ListView template demo this is done by overriding the k-listview-content class:

.k-listview-content { display: grid; grid-template-columns: repeat(auto-fill, 180px); gap: 30px 20px; }

On that page that screws up the other listview.

Is there a different way to achieve this?

Andy

Marin Bratanov
Telerik team
 answered on 06 Mar 2022
1 answer
167 views

Good morning all,

I'm taking a look to the new Filter component, recently added to Telerik UI for Blazor.

I'm using it to build conditions to send to a custom SQL Query generator which will build the where clauses mapping from the export of the filter component.

At the moment I'm simply serializing the CompositeFilterDescriptor to JSON obtaining something like this:

{
    "FilterDescriptors": [{
            "Operator": 4,
            "Member": "Quantity",
            "Value": 25
        }, {
            "Operator": 1,
            "Member": "Quantity",
            "Value": 40
        }, {
            "Operator": 2,
            "Member": "OrderShipCountry",
            "Value": "France"
        }, {
            "FilterDescriptors": [{
                    "Operator": 17,
                    "Member": "OrderShipName",
                    "Value": "La maison d\u0027Asie"
                }, {
                    "Operator": 18,
                    "Member": "OrderShipName",
                    "Value": "Victuailles en stock"
                }
            ],
            "LogicalOperator": 1
        }
    ],
    "LogicalOperator": 0
}

and I will have the Query Generator parse it, but if there are better strategies, please let me know.

Thanks, have a nice day.

PS: I tagged this question as General Discussion as it seems like a "Filter" tag is not available yet.

Marin Bratanov
Telerik team
 answered on 06 Mar 2022
1 answer
148 views
I saw the FloatingActionButton Web control available in KendoUI and ASP.NET Core.  Is the FloatingActionButton coming to UI for Blazor?
Marin Bratanov
Telerik team
 answered on 06 Mar 2022
1 answer
703 views

Repro: Go to https://demos.telerik.com/blazor-ui/editor/overview and in the REPL demo change the demo to any of the dark themes and try to type. Nothing is visible because the text color is same as the control background (black).

Is there a way to either make the text color white, or make the background of the Editor control white, or anything else to make it usable when using a dark theme?

Svetoslav Dimitrov
Telerik team
 answered on 02 Mar 2022
0 answers
99 views

Hi,

I'm using a TelerikGrid to display some results and I'd like to let the user select the results he wants to keep on screen by having a button "Edit" that makes a checkboxColumn visible in order to select/deselect the items he wants to keep. Problem is :
This is my button declaration :<GridCommandButton Command="EditDisplayedResults" OnClick="OpenEditMode" IconClass="fa fa-edit"></GridCommandButton>

And this is its handler

protected async Task OpenEditMode()
        {
            editMode = true;
            Console.WriteLine("Open Edit mode");
            StateHasChanged();
        }

Now when I click on the button the event is well triggered but the column doesn't appear directly after the Visible property is set to true. Even with the StateHasChanged is doesn't rerender the grid. The only way to make the column appear is by changing page. Is there a ay to rerender the grid in my case ? And if possible without having to reload the data because it takes some time...

Thanks in advance

Rémy

Rémy
Top achievements
Rank 1
 asked on 02 Mar 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?