DataGrid user color selection

  • Thread starter Thread starter Patrick Delifer
  • Start date Start date
P

Patrick Delifer

HI,
I have a DataGrid displaying a list of orders. I want to give the user the
possibility of changing the row color (that he can select from a drop down
or something else). Is there a way to do this without affecting my DB? (I
was thinking of adding a Color column in my DB that would save his color
scheme, but then it adds a lot of load on the ItemdataBound that has to
iterate through every item in the DG.

Thanks
 
Patrick said:
HI,
I have a DataGrid displaying a list of orders. I want to give the user the
possibility of changing the row color (that he can select from a drop down
or something else). Is there a way to do this without affecting my DB? (I
was thinking of adding a Color column in my DB that would save his color
scheme, but then it adds a lot of load on the ItemdataBound that has to
iterate through every item in the DG.

Patrick, there is a DataGrid-specific newsgroup, where you might want to
post such focused DataGrid questions in the future:
microsoft.public.dotnet.framework.aspnet.datagridcontrol.

Anywho, to answer your question, you could just store the color choice
in the database in a Users table (or whatever). Then, in the ASP.NET
Web page that displayed the DataGrid, the simplest thing would be to set
the DataGrid's ItemStyle.BackColor property to the user's preferred
color before binding the data to the DataGrid.

Make sense? Hope this helps! :-)

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 

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

Back
Top