473,379 Members | 1,245 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,379 software developers and data experts.

question about grid columns

Hi all,
What is the best way to allow the administrator of the application to
select which columns are displayed in a Databound grid in an aspx form. I
was thinking of creating a form and display all possible columns with a
checkbox. The admin would check the checkboxes for each column they want to
display in the grid. My question is where should I save these settings ( in
XML or SQL Server?). Also when these settings are changed, how can I force
the application to use the updated settings if the application is already
running. Where should I write the code to read these settings(I was thinking
to use Application_Start in global.asax and store the settings in
Application object) and to save these settings(I have no idea where should I
write code to save settings). Any code samples would also be appreciated.

Thanks in advance.
Nikhil
Nov 18 '05 #1
1 1696

Hi Nikhil,

The answer to your question depends heavily on your requirements. For
example, can the administrator select settings for more than one datagrid, or
all datagrid types inherit from one selection.

In any case, I would recommend using Database for such a purpose. It's also
better to create the datagrid on a request basis. This way, you can reflect
the latest changes. If I were you (and once I did this in a similiar
situation) I would write a stored procedure, which returns data and also the
datagrid meta information, such as which columns to display, their headtexts,
etc. This would give you the biggest flexibilty. It's only downside is, when
you want to do cell specific processing (for example making a cell red if
it's value is less than a threshold etc.) then you need a good design to
handle this.

Using an XML file is faster, but it's rather more meaningful to use an XML
file as a readonly template, which defines some settings but not supposed to
be changed through the application. Just think about the design behind the
web.config file and the usage of it.

Hope this gives some ideas,

Ethem Azun

"Nikhil Patel" wrote:
Hi all,
What is the best way to allow the administrator of the application to
select which columns are displayed in a Databound grid in an aspx form. I
was thinking of creating a form and display all possible columns with a
checkbox. The admin would check the checkboxes for each column they want to
display in the grid. My question is where should I save these settings ( in
XML or SQL Server?). Also when these settings are changed, how can I force
the application to use the updated settings if the application is already
running. Where should I write the code to read these settings(I was thinking
to use Application_Start in global.asax and store the settings in
Application object) and to save these settings(I have no idea where should I
write code to save settings). Any code samples would also be appreciated.

Thanks in advance.
Nikhil

Nov 18 '05 #2

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

Similar topics

5
by: Will | last post by:
I've got a simple form that collects data from a user and I want to display that data in a sortable grid or table. The nature of this data is rather temporary, so there's no need to persist it to a...
4
by: z. f. | last post by:
Hi, i stated that this is an advanced question because i have a post from few days ago that i received answers to with suggestions that looked good but did not work, so please if you post a...
0
by: Nikhil Patel | last post by:
Hi all, What is the best way to allow the administrator of the application to select which columns are displayed in a Databound grid in an aspx form. I was thinking of creating a form and display...
7
by: Chris | last post by:
I'm using ASP.NET and SQL Server and this might be an obviuos question for most, but if I have a table that contains several fields that I need to relate to just one field in another table, how do...
4
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem...
13
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql...
0
by: Volker Lenhardt | last post by:
Once again a maybe silly question, but I find no solution, neither in the documentation nor in examples. I have got some different layouts to change place by the help of a QGridLayout in its...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
4
by: jm1 | last post by:
Longtime lurker... first post. These forums have already helped a lot, so thanks. I have a design issue that is probably easy to figure out for someone with a little more DB experience than myself....
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.