Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/12/2006, 17:12
Avatar de splinter
splinter
 
Fecha de Ingreso: junio-2004
Ubicación: Misantla,Ver.Mexico
Mensajes: 181
Antigüedad: 19 años, 10 meses
Puntos: 0
Re: .NET 2.0 - Javascript - GridView.

algo parecido hice con un grid, pero no le pongo "form"
y me ha funcionado perfectamente

La funcion se la agrego en un webcontrol
asi:

string item = e.Row.Cells[i].Text.ToString();
string OutputView = e.Row.Cells[1].Text.ToString();//2 columna comenzando de 0
string javascriptfunction = "GetItemSelect('" + OutputView + "','" + OutputView + "','&')"; //antes item
System.Web.UI.WebControls.Label oLbl = newLabel();
oLbl.CssClass =
"Hand";
oLbl.Text = item;
oLbl.Attributes.Add(
"onclick", javascriptfunction);//agregar funcion javascript al control
e.Row.Cells[0].Controls.Add(oLbl);



//JAVASCRIPT

function GetItemSelect(value1,value2,AuxiliarChar)
{

if(document.getElementById("Txtcomponentid").value=="108")
{
...
...
}