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

Both Virtualization and Cascading in one DropDownList?

4 Answers 246 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 07 Oct 2015, 01:37 PM

We have a DropDownList that has several thousand records, so we set it up using Virtual following the example of the Virtualization demo.  We have a new requirement that those records need to be filtered by the selection of a different DropDownList, so this virtual DropDownList will need to cascade from the other DropDownList.  Even filtered, there will still be a thousand records in the DropDownList, so it still needs to be virtual.

Is it possible to use virtualization with a DropDownList that cascades?

4 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Oct 2015, 10:28 AM
Hello Kevin,

Yes, the widget can be used both with cascading and virtualization functionality. In their code, those features will filter (cascade) and page (virtualize) the data. If those actions are implemented correct on server side, then there shouldn't be any issues. In other words, you need to ensure that filtering and paging are implemented correctly. For instance, our online virtualization demo shows how to filter and page the date together.

I would suggest you review the Virtualization help topic for more details.

Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Kevin
Top achievements
Rank 1
answered on 09 Oct 2015, 03:11 PM

Hi Georgi, I think we might be referring to two different things.  I see that this virtualization example appears to use .Filter(FilterType.Contains) -- although I don't see that in the example code -- but I need to use the Cascading DropDownList feature (like this example) along with virtualization, and that's where I'm having trouble.

The cascading dropdownlist uses this type of datasource:

.DataSource(source => {
    source.Read(read =>
    {
        read.Action("GetCascadeOrders", "ComboBox")
            .Data("filterOrders");
    })
    .ServerFiltering(true);
})
 

The virtualization dropdownlist uses a custom datasource with:

.Transport(transport =>
{
    transport.Read("Virtualization_Read", "DropDownList");
})
 

transport.Read does not appear to have the option to add a .Data() JavaScript to it to enable the filtering on the Id of the DropDownList being cascaded from.

Would you be able to make an example of modifying the Cascading DropDownList demo to make the Orders dropdownlist virtualized, so that it still cascades from the Products dropdownlist, but is also virtualized?

0
Accepted
Georgi Krustev
Telerik team
answered on 13 Oct 2015, 11:10 AM
Hello Kevin,

The cascading functionality in its essence is "filtration". You can find more details in this article:
The virtualization on the other hand is just data paging (in the server side perspective). More details can be found here:
That being said, once the server supports filtration and paging, the child widget that is virtualized and cascades from parent should work without a problem. The custom data source even simplifies the things, because both cascade filter and page details are applied all together by ToDataSourceResult method.

Please check the attached test project, which shows how cascading can be combined with virtualization.

Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Kevin
Top achievements
Rank 1
answered on 13 Oct 2015, 02:28 PM
Hi Georgi, thank you for walking me through that and making that clear.  I see now my problem was I was trying to do the filtering on the Id of cascaded from dropdown myself, in both the ValueMapper function and the DataSource Read, and I couldn't get the DataSource to use the Id.  I appreciate you making it clear that the DataSourceRequest handles the filtering on the cascaded from Id.  Thanks!
Tags
DropDownList
Asked by
Kevin
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or