This is a migrated thread and some comments may be shown as answers.

Set DataTextField dynamically

2 Answers 143 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 21 Mar 2018, 06:57 PM

How to set DataTextField of ListBox dynamically

I have a listbox control as

@(Html.Kendo().ListBox()
        .Name("ListboxCompany")
        .Selectable(ListBoxSelectable.Single)
            .DataTextField("name")
            .DataValueField("Id")                       
            )
            .BindTo(Model)       
        )

 

and

created a radiobuttongroup.  So how I can change DataTextField with the value checked from radiobuttongroup

 

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Mar 2018, 07:01 AM
Hello, Antony,

In general, this could be achieved using the setOptions method of the ListBox, but after testing I noticed that there is an issue with the method.

I logged this as an issue, and once it is resolved the desired result can be achieved:

https://github.com/telerik/kendo-ui-core/issues/4110

I added Telerik points to your account as this question helped us to locate the issue.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Antony
Top achievements
Rank 1
answered on 26 Mar 2018, 01:25 PM

Hi Stefan,

 

Thanks for reply. Much Appreciated

Tags
ListBox
Asked by
Antony
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Antony
Top achievements
Rank 1
Share this question
or