need some design help here with DataGrid & styles

G

Guest

What I was hoping to do was have a universal Windows Form which features a
DataGrid.

This Formcould be accessed from several different points of entry, each one
may require a different style (different columns to show, different RowFilter
expression, etc..)

So I created the form and a class which holds several configuration objects,
such as TableStyle, a string to hold a RowFilter expression, etc... What I
wanted was each different point of entry would open this Form and pass it's
configuration along. The Form then reconfigures itself to suite that particle
style.

The problem is I am not very familiar with how a DataGrid works. There is
this TableStyles collection and if I add a style to it to suite one
configuration, and then another configuration comes along do I add another
style or clear that collection first so there's no confilct?

Also, when the Form is closed it Disposes the object... I was hoping it
would just hide it because I can expect the user to open the same form later
using a different configuration. So disposing it and instantiating a new
every time seems wasteful.

I hope I didn't make this sound more confusing then it really is- it's
supposed to be simple but I'm getting caught up in details...

please lend me a hand here
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top