473,385 Members | 1,766 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.

Highlight GridView row clientside with javascript?

Since Ajax.net isn't production-worthy yet, I'm looking for any info on this
(as well as manipulating GridView from client script in general). Thank you!
Nov 16 '06 #1
1 2109
Since GridView is just a table when rendered, all it takes is the table
object model and dhtml:

function updateGrid(iRow, sName, sCity, sState){
//new row
var gridView = document.getElementById('GridView1');
var oRow = gridView.insertRow();

var oCell = oRow.insertCell(0);
oCell.innerHTML = sName;
oCell = oRow.insertCell(1);
oCell.innerHTML = sCity;
oCell = oRow.insertCell(2);
oCell.innerHTML = sState;
/*update existing row
gridView.rows[iRow].cells[0].childNodes[0].nodeValue = sName;
gridView.rows[iRow].cells[1].childNodes[0].nodeValue = sCity;
gridView.rows[iRow].cells[2].childNodes[0].nodeValue = sState;
*/
}
--Marc

"Marc Pavo" <mp**********@spam.bio-optronics.comwrote in message
news:uh**************@TK2MSFTNGP04.phx.gbl...
Since Ajax.net isn't production-worthy yet, I'm looking for any info on
this (as well as manipulating GridView from client script in general).
Thank you!

Nov 17 '06 #2

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

Similar topics

0
by: Fernando Lopes | last post by:
Hi there. I want to create this two features for my grids. - Row will highlight when mouse over - User can click in anywhere to select the row Note: I using gridview in the vs 2005 beta 2. ...
1
by: Matt Colegrove | last post by:
Is there a way to apply a "mouseover" command to the cell level of a GridView? I can do it at the row level, but I want to be able to do it at the cell level. I was able to do it with the...
14
by: Averell | last post by:
Hi, I made a gridview with VWD. The gridview has the Delete button set (ShowDeleteButton="True" in the <asp:CommandField>). It works perfect, but i would like to add a warning before the record...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
4
by: kurt sune | last post by:
I have a an aspx page with a gridview. The gridview is data bound to a generic list of custom classes. The gridview's DataSource is thus not set. Now I want to add sorting to it. So I create...
2
by: rohitscripts | last post by:
i have a gridview in my web page which shows the details like employee name, employee salary. i filled my gridview using a dataset and all the values are retrieved from sqlserver db. now, in my...
2
by: John Kotuby | last post by:
Hi all, In ASP.NET 2.0 and VB.NET, I am trying to get the OnSelectedIndexChanged event to fire a Javascript function. There is no OnClientClick event for that control. When I try something...
4
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
2
by: J | last post by:
I'm trying to highlight a gridview row when it is clicked. Because the gridview is populated via ajax, adding attributes using OnRowCreated doesn't work. How can I best accomplish this? Thanks.
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.