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

Keep colored cells of my datagrid in memory

Hi,
I'm addin javascript on some of my datagrid cells in the
ItemCreatedEven which changes cell color on click (simulating
selection).

However, Postback event erase all selection and bring back default grid
color.

How can I keep in memory the user selection ?

Thks for help.

Nov 19 '05 #1
5 1016
ItemCreated is a wrong event for your purpose. You should use either
ItemDataBound or PreRender.

Eliyahu

"Franck" <we**********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,
I'm addin javascript on some of my datagrid cells in the
ItemCreatedEven which changes cell color on click (simulating
selection).

However, Postback event erase all selection and bring back default grid
color.

How can I keep in memory the user selection ?

Thks for help.

Nov 19 '05 #2
Whatever Event I use, cells colors are not kept in memory.

Nov 19 '05 #3
Do you mean you want to keep the color that was set on client side in
javascript? The server has no idea about what is going on in javascripts on
client side. You have to communicate color setting information from client
to server separately, for example to code it in a string and pass it up in a
hidden input control.

Eliyahu

"Franck" <we**********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Whatever Event I use, cells colors are not kept in memory.

Nov 19 '05 #4
I knew I'll have to do sth like that...
Just hope to find another way.

Thks for your help

Eliyahu Goldin wrote:
Do you mean you want to keep the color that was set on client side in
javascript? The server has no idea about what is going on in javascripts on
client side. You have to communicate color setting information from client
to server separately, for example to code it in a string and pass it up in a
hidden input control.

Eliyahu

"Franck" <we**********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Whatever Event I use, cells colors are not kept in memory.


Nov 19 '05 #5
On Mon, 27 Jun 2005 11:36:08 +0200, Eliyahu Goldin wrote:
ItemCreated is a wrong event for your purpose. You should use either
ItemDataBound or PreRender.

Eliyahu

"Franck" <we**********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,
I'm addin javascript on some of my datagrid cells in the
ItemCreatedEven which changes cell color on click (simulating
selection).

However, Postback event erase all selection and bring back default grid
color.

How can I keep in memory the user selection ?

Thks for help.

Keep in mind the entirely separate domains you are using in web
applications: client-side and server-side do not mix well. ASP.NET
attempts to make it possible to have applications behave as it the
if the client-side is fully accessible at the server on PostBack.

Nov 19 '05 #6

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

Similar topics

5
by: Ariel Gimenez | last post by:
Morning! After several hours breaking my mind, finally my code works, but i think is trash-code, can someone tellme how is the correct way to access the value of my cells within a datagrid?... in...
2
by: Craig Buchanan | last post by:
Is there a way to add a row to a datagrid during the ItemDataBound event? I would like to add a 'header' row before the start of a group of rows. Thanks, Craig Buchanan
4
by: EMW | last post by:
For my ASP.NET program I want to use the datagrid as a sort of planning tool. Based on the information in a XML file, a cell of the datagrid must show an image... Well, this is what I would...
1
by: martin | last post by:
Hi, I have a datagrid that contains 3 colums. This is rendered to the page fine, except that I would like to be able to control the width of each table cell of the datagrid I have the following...
0
by: Eugene | last post by:
Hi everybody! Got the logical error (wrong row (SSN) selected on SelectedIndexChange event) when made a sort by non-key field in Datagrid. Used this Sub to keep the keyfield ("SSN"): ...
3
by: tshad | last post by:
How do I get blank cells to show in my dataGrid? I am databinding to my datagrid, but any cells that are blank, don't show. Normally, you would put an &nbsp in the cell to make IE display the...
1
by: David Tilman | last post by:
I have an ASP .NET web application that changes datagrid cells in the ItemDataBound event, like changing the Columnspan of a cell to 2 and deleting the adjacent cell, so that I have two cells...
0
by: cwbp17 | last post by:
I'm having trouble updating individual datagrid cells. Have two tables car_master (columns include Car_ID, YEAR,VEHICLE) and car_detail (columns include Car_ID,PRICE,MILEAGE,and BODY);both tables...
0
by: rn5a | last post by:
This is the code of a DataGrid: <asp:DataGrid ID="dgCart" OnEditCommand="EditCart" OnCancelCommand="CancelUpdate" OnDeleteCommand="DeleteFromCart" OnItemCommand="ButtonClicked"...
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: 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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.