Data Refreshing in FarPoint Grid - WinForm

Posted by: wedant on 8 September 2017, 1:06 pm EST

  • Posted 8 September 2017, 1:06 pm EST

    Hi,

    I am using 3.0.2005.2005 Version of FarPoint WinForm Control.
    In the grid I have set Datasource as object of an IList class type.
    In runtime I am changing value of particular cells and calculating value of particular cell based on entered value. Without calling Invalidate() method grid not getting refreshed.
    There is any option to get same result without calling Invalidate() method.


    Code Sample:
    if ( e.Column == this.grdLaborPlanning.GetColumnIndexFromKey ( COLUMN_ST ) )
                    {
                        this.m_OrderBookings [ modelRow ].ST = Convert.ToInt32 ( e.EditingControl.Text );
                    }
                    else if ( e.Column == this.grdLaborPlanning.GetColumnIndexFromKey ( COLUMN_OT ) )
                    {
                        this.m_OrderBookings [ modelRow ].OT = Convert.ToInt32 ( e.EditingControl.Text );
                        this.m_OrderBookings [ modelRow ].ST = ( this.m_OrderBookings [ modelRow ].Duration ) - ( this.m_OrderBookings [ modelRow ].OT + this.m_OrderBookings [ modelRow ].DT );
                    }

                    else if ( e.Column == this.grdLaborPlanning.GetColumnIndexFromKey ( COLUMN_DT ) )
                    {
                        this.m_OrderBookings [ modelRow ].DT = Convert.ToInt32 ( e.EditingControl.Text );
                        this.m_OrderBookings [ modelRow ].ST = ( this.m_OrderBookings [ modelRow ].Duration ) - ( this.m_OrderBookings [ modelRow ].OT + this.m_OrderBookings [ modelRow ].DT );
                    }

    this.grdLaborPlanning.Invalidate ( e.EditingControl.Region );


    Thanks and Regards

    Wedant

  • Replied 8 September 2017, 1:06 pm EST

    Wedant,


    You would need to implement the IBindingList interface to have the list automatically update the controls bound to it. Take a look at the following thread for code on how to implement this.

Need extra support?

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

Learn More

Forum Channels