Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DataForm > e.Order in Dataform_AutoGeneratingField

Not answered e.Order in Dataform_AutoGeneratingField

Feed from this thread
  • Thomas avatar

    Posted on Mar 29, 2012 (permalink)

    Hello,

    My business object properties have a attribute DisplayIndex and I want to set the order of my datafields to this displayindex.

    DisplayIndexAttribute displayIndexAtt;
     if (property.TryGetAttribute<DisplayIndexAttribute>(out displayIndexAtt))
                {
            
                    e.Order = displayIndexAtt.index;
                }

    This is working fine. But the problem is that not all properties have the displayindex attribute, so for some properties e.Order is null. I expected that these properties are displayed at the end of the dataform, but instead they are at the beginning.

    Is there a way to change this behavior in the way that the properties without an explicit order will be at the end of the Dataform?

    Reply

  • Pavel Pavlov Pavel Pavlov admin's avatar

    Posted on Mar 29, 2012 (permalink)

    Hi Thomas,

    I believe the only way to do this is to iterate over the elements and assign a large number(exceeding the max possible count of fields )  to those whose initial value is null.

    Regards,
    Pavel Pavlov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DataForm > e.Order in Dataform_AutoGeneratingField