Coder Social home page Coder Social logo

Comments (7)

ryanherman avatar ryanherman commented on August 10, 2024 1

Ah, I got it working thank you!

I love you plugins they are so well done!

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

I'll need full code. Here's grouping example:

https://github.com/daniel-luberda/DLToolkit.Forms.Controls/blob/master/Samples/DLToolkitControlsSamples/SamplesFlowListView/GroupingPage.xaml

from dltoolkit.forms.controls.

ryanherman avatar ryanherman commented on August 10, 2024

In my XAML I have:
<controls:FlowListView Grid.Row="2" FlowColumnCount="1" SeparatorVisibility="None" HasUnevenRows="true" x:Name="ProjectFlow" BackgroundColor="Transparent" FlowUseAbsoluteLayoutInternally="True" IsGroupingEnabled="True"> </controls:FlowListView>

in my Code I have
` private void LoadEvents(MessageHelper arg)
{
if (App.IotaConnect.isConnected() == false)
{
UserDialogs.Instance.Alert(AppResource.NoInternet, AppResource.NoInternetTitle,
AppResource.OK);
return;
}

        ProjectFlow.FlowColumnTemplate = new FlowTemplateSelector();
        ProjectFlow.FlowItemsSource = arg.EventListV2.events;

        LoadTabs(arg);
    }`

My FlowTemplateSelector() is:
` public class FlowTemplateSelector : DLToolkit.Forms.Controls.FlowTemplateSelector
{
DataTemplate _eventCell = new DataTemplate(typeof(EventCellNew));
DataTemplate _celebCell = new DataTemplate(typeof(CelebCell));
DataTemplate _likeCell = new DataTemplate(typeof(LikeCell));

    protected override DataTemplate OnSelectTemplate(object item, int columnIndex, BindableObject container)
    {
        var type = item.GetType();
        if(type == typeof(ProjectById.Event))
        {
                return _eventCell;
        }

        if (type == typeof(FanBase.Event))
        {
            return _celebCell;
        }

        return _eventCell;
    }
}`

But I put a breakpoint on var type = item.GetType(); and it never gets to it. If I put False for IsGroupingEnabled it will hit the breakpoint.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

You are missing FlowGroupDisplayBinding="{Binding Key}"

from dltoolkit.forms.controls.

ryanherman avatar ryanherman commented on August 10, 2024

I had it in there and it was still not hitting the template selector.
<controls:FlowListView Grid.Row="2" FlowColumnCount="1" SeparatorVisibility="None" HasUnevenRows="true" x:Name="ProjectFlow" BackgroundColor="Transparent" FlowUseAbsoluteLayoutInternally="True" IsGroupingEnabled="True" FlowGroupDisplayBinding="{Binding Key}" FlowGroupShortNameBinding="{Binding Key}"> </controls:FlowListView>

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Does your model have a valid Key property? You can clone repo and test sample project to see what is missing or put your code there.

from dltoolkit.forms.controls.

daniel-luberda avatar daniel-luberda commented on August 10, 2024

Great, nice that you worked it out :)

from dltoolkit.forms.controls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.