Sub-classed Infragistcs Grid with layout saving feature


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
This is a simple sample on a subclassed UltraGrid that will save changes made by the user on its columns' order, widths, groups, etc, into a XML file.

In order to save it, there is a base form that will iterate through all controls and find any grid inherited from your base grid and use its DisplayLayout method.

Also, a Datasource issue is taken care of at this moment, when closing the form with an UltraGrid in it would throw exceptions at certain situations.

The layout Load is dealt with at the grid's own InitializeLayout.

Attachments
UltraGridSample.zip (272 views, 132.00 KB)
Russell Scott Brown
Russell Scott Brown
StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)
Group: Forum Members
Posts: 124, Visits: 597
Thanks Ivan.

Russ Brown (Using C#2010/SQL Server 2008)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
And here is the C# version.

Please, bare with me... this is the first C# project I have ever created. BigGrin

Thanks to: http://www.developerfusion.com/tools/convert/vb-to-csharp/

Attachments
UltraGridSampleCSharp.zip (265 views, 115.00 KB)
Russell Scott Brown
Russell Scott Brown
StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)StrataFrame User (278 reputation)
Group: Forum Members
Posts: 124, Visits: 597
Thanks Ivan!

Russ Brown (Using C#2010/SQL Server 2008)
Sahar Roostaee
Sahar Roostaee
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: Forum Members
Posts: 1, Visits: 3
Hi Ivan
Thanks for your sample, but where is MicroFour.StrataFrame?
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sahar.

You are welcome.

I didn't quite understand your question. Have you got StrataFrame installed on your machine?
Lowell Burnett
Lowell Burnett
StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)StrataFrame Beginner (5 reputation)
Group: StrataFrame Users
Posts: 1, Visits: 2
Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
????
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Hugo,

Well, at least we get some spams from time to time BigGrin

Edhy Rijo

Hugo R. Figueroa
Hugo R. Figueroa
StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)StrataFrame User (163 reputation)
Group: StrataFrame Users
Posts: 81, Visits: 3.1K
Hi Edhy,

Yes, at first I thought  he'd must had something really good     BigGrin


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