Refreshing Grids


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Then just use that new BBS like normal and call your ResetDataSource() method after you're done with the Undo().
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Are you using a BusinessBindingSource?  If so, then your best bet will be to create a new class that inherits from BBS for use with this grid.  THe only thing you will need to do is create a method, say, ResetDataSource() that internally calls OnListChanged and passes a new ListChangedEventArgs.  You can pass Reset for the enum and -1 for the index to the ListChangedEventArgs constructor.  That event is what the grid listens to to refresh the grid.
Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Tim,

Are you perhaps forgetting to reset your grid's data source, e.g. grid.DataSource = RefreshedCopyOfYourDataTable?

Cheers, Peter

Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I'm having problems refreshing data on my grid (Infragistics) when I do the following.  (I don't normally do this but I have a weird situation and this is the only way I can solve it)

I am filling two business objects when I first load a form.  I save off these two BO's into variables. Due to database design I have to physically save data during the editing session.  When I click on the 'Undo' button, I refill the business objects using the saved values (I am using the CopyDateFrom method)

Everything is fine however the grid doesn't reflect the changes.  Any suggestions on how to do this?

Thanks,

Tim

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search