473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

need some design help here with DataGrid & styles

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
Nov 16 '05 #1
1 1093
I would suggest you read up on the DataGrid control on:

http://msdn.microsoft.com/library/de...ClassTopic.asp

To answer your second question, why don't you just hide the form instead of
closing it down ? You could rebuild the dataGrid dynamically couldn't you ??

With Regards
Shane Sukul
MCSD MCAD

"MrNobody" wrote:
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

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
0
by: Wasco | last post by:
Hi all, I would like using an extern css file for defining datagrid style: <asp:datagrid id="DataGrid1" runat="server" GridLines="Horizontal" CellPadding="3" CssClass="gridDetail">...
1
by: MSK | last post by:
Hi I am trying to design a small WEB application to track the employees holiday/leave details using .Net technologies ( ASP.NET/ SQL server) I wan to design a matrix control (using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.