Sorting Problem

Posted by: ramnath-fp on 8 September 2017, 2:25 pm EST

  • Posted 8 September 2017, 2:25 pm EST

    Hi,

    public class DuplicateCheck
        {
            public DuplicateCheck
                (
                    string pDesc
                )
            {
                desc = pDesc;
            }
            #region Desc
            private string desc;
            ///


            ///
            ///

            public string Desc
            {
                get { return desc; }
                set { desc = value; }
            }
            #endregion
        }

     

    Note:-

    List duplColl = new List();
    duplColl.Add (new DuplicateCheck("Ram") );

     duplColl.Add (new DuplicateCheck("Abhay") );

      duplColl.Add (new DuplicateCheck("Ben") );

     duplColl.Add (new DuplicateCheck("Chandan") ); 

     

    When we bind this collection to spread, its display like that

    Ram

    Abhay

    Ben

    Chandan

    After Sorting this column data display like that

    Abhay

    Ben

    Chandan

    Ram

    but internally if u check the data is available in actual bind format.

    BindCollection not sort with spread.

    If we get row=0 and column =0 value

    It is  "RAM" but visible is "Abhay"

     

    please check and send me repply.

     

    thanks and regards,

    Ram Nath Verma

    Mumbai(INDIA)

     

  • Replied 8 September 2017, 2:25 pm EST

    Hello Ramnath,

    Your observation is correct as sorting does not affect the data model, it only affects how the data is being displayed and that's why you are getting the behavior you are seeing.

    Thanks.

  • Replied 8 September 2017, 2:25 pm EST

    Hi,

    Thanks for reply.

    Suppose i have two spread in our form.
    First spread we displayed Item details and second spread display Orders of the selected item.

    Example

    ItemNo           ColorNo        Item           Color

    1                      2               Toys           Red

    2                      1               Apple          ----

     

    Order like that

    OrdrItemNo                OrderColorNo                Qty

      1                                  2                             5

     2                                   1                           10

     

     Note:-

    After load data in first spread we call leavecell event and  get current row itemNo and colorno and load order data according this. 

    When we sort Item,  Order displayed of another items.

     

    Thanks and regards,

    Ram Nath Verma

    Mumbai(INDIA)

     

     

     

  • Replied 8 September 2017, 2:25 pm EST

    Hello,

    After applying a Sort you may use "GetViewRowFromModelRow" property to get the desired Row Index and on this basis you may get the row item.

     

    Thanks,

     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels