473,326 Members | 2,133 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,326 software developers and data experts.

GridView/DataGrid via JavaScript?

Hi,

i am working at .NET Web-Application (c# codebehind) and i have placed on my
web-site a GridView, aka DataGrid (that works as Server control). This
GridView generated following code in HTML-source:

<asp:GridView ID="GridView1" runat="server">
</asp:GridView>

Is there a way to "reach" a GridView (or a GridView-Row) via Javascript? For
example to change its BackColor, something like:

GridView1.BackColor="blue";

or

GridView1.Rows[0].BackColor="blue";

but with JavaScript?

Please help...

Thanks!
Sep 22 '06 #1
1 1845
pApAk wrote:
This GridView generated following code in HTML-source:
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
I guarantee that is not the generated html. Instead, that's the generated
asp code or whatever.
Load the age in your browser and view source. You'll find what you need.
Is there a way to "reach" a GridView (or a GridView-Row) via
Javascript? For example to change its BackColor
Probably. But the generated html/xhtml/js from .NET is so horrible that I
wouldn't even want to try to touch it.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Sep 22 '06 #2

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

Similar topics

1
by: chrismichaelgardner | last post by:
Has anyone figured out how to get rid of the "doPostback" Javascript errors on Safari. I have a simple page with one gridview. When a row is selected, Safari hangs and the Javascript console...
3
by: Seagull Ng | last post by:
Hello all, I am doing my web-based reporting tool in ASP.Net 2.0 using Visual Web Developer 2005. I try to export my populated gridview to Excel spreadsheet but what I got is just a blank...
3
by: Simon Harvey | last post by:
Hi all, Can anyone tell me what the easiest way to achieve a collapsable panel area in a datagrid is? Do I need to find a third party panel control or does the datagrid/gridview somehow support...
0
by: Maarten | last post by:
Hi all, I have a datagrid (GridView) with questions where the user has to make a choice (yes or no questions) But for some questions there are rules, like if you choose (yes or no) for some...
6
by: InK_ | last post by:
Hi, All! I need to accomplish such functionality: A data row should be highlighted with the other color if cursor is over it. I also have the old code from asp which uses <tr...
6
by: GaryDean | last post by:
I liked the DataGrid because I was familiar in walking through it to do custom filling and retrieval of data in cases where standard binding wouldn't do the job. I read somewhere that the object...
7
by: GaryDean | last post by:
I'm trying to load a GridView up with data manually, in code. I'm not using any datasource. Using this code.... ArrayList myRowArrayList; GridViewRow myGVR = new...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
2
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.