Ver Mensaje Individual
  #12 (permalink)  
Antiguo 20/09/2005, 10:27
Santy.E
 
Fecha de Ingreso: julio-2005
Mensajes: 78
Antigüedad: 18 años, 9 meses
Puntos: 0
:-d

hmm no me sacó error pero tampoco me cargó los datos cheka este cod:

Global declaré esto:

Código:
		DropDownList Prioridad= new DropDownList();
		DropDownList TipoE= new DropDownList();
		DropDownList Respon = new DropDownList();
en el evento itemdatabound hice esto:

Código:
		private void dgIngreso_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
		{
			Respon =(DropDownList)e.Item.FindControl("ddlRespon"); 
			TipoE =(DropDownList)e.Item.FindControl("ddlTipoE"); 
			Prioridad =(DropDownList)e.Item.FindControl("ddlPrioridad"); 
		}
Esos eran mis tres ddl del DataGrid

y en el load hice esto:


Código:
			#region Carga Combo Responsables
			string DirRes =Server.MapPath("General.xml");

			string SQLRespon="select strCodUsuario,strNombreCorto from tblUsuarios where intEstado=1 and strTipoUsuario=1 or strTipoUsuario=3 or strTipoUsuario=6 or strTipoUsuario=8";
			SqlConnection  cnRes= new SqlConnection (clsConexion.ConexionXML(DirRes));
			SqlDataAdapter daRes= new SqlDataAdapter(SQLRespon,cnRes); 
			DataSet dsRes= new DataSet();
			daRes.Fill(dsRes);
			
			Respon.DataSource=dsRes.Tables[0];
			Respon.DataTextField="strNombreCorto";
			Respon.DataValueField="strCodUsuario";
			Respon.DataBind();
			
			#endregion

			#region Carga Combo Tipo Error
			string dirTe =Server.MapPath("General.xml");
			try
			{
				string SQLTe="select strDescCortaTb,strDescripcionTb,strValorTb from tblTablasBasicas where strCodAppl=" + clsUtilidades.CodAppl(dirTe) + " AND strCodigoParam=" + clsUtilidades.CodParamTipoE(dirTe);
				SqlConnection  cnTe= new SqlConnection (clsConexion.ConexionXML(dirTe));
				SqlDataAdapter daTe= new SqlDataAdapter(SQLTe,cnTe); 
				DataSet dsTe= new DataSet();
				daTe.Fill(dsTe);

				TipoE.DataSource= dsTe.Tables[0];
				TipoE.DataTextField="strDescCortaTb";
				TipoE.DataValueField="strValorTb";
				TipoE.DataBind();
			}
			catch(Exception Ex)
			{
				Response.Write(Ex.Message + " " + Ex.InnerException);
			}
			#endregion

			#region Carga Combo Prioridad
			string dirPrio =Server.MapPath("General.xml");
			try
			{
				string SQLPrio="select strDescCortaTb,strDescripcionTb,strValorTb from tblTablasBasicas where strCodAppl=" + clsUtilidades.CodAppl(dirPrio) + " AND strCodigoParam=" + clsUtilidades.CodParamPrioridad(dirPrio);
				SqlConnection  cnPrio= new SqlConnection (clsConexion.ConexionXML(dirPrio));
				SqlDataAdapter daPrio= new SqlDataAdapter(SQLPrio,cnPrio); 
				DataSet dsPrio= new DataSet();
				daPrio.Fill(dsPrio);

				Prioridad.DataSource=dsPrio.Tables[0];
				Prioridad.DataTextField="strDescCortaTb";
				Prioridad.DataValueField="strValorTb";
				Prioridad.DataBind();
			}
			catch(Exception Ex)
			{
				Response.Write(Ex.Message + " " + Ex.InnerException);
			}
			#endregion

Que hice mal?? no me cargó ni un dato, pero tampoco sacó error