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
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

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?
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
