ASP.NET - necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

 
Vista:
sin imagen de perfil

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por Isa (3 intervenciones) el 24/05/2016 20:41:39
necesito cargar funcionesmysql y afecten informacion cargada en un grid asp.net
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-1
Responder
Imágen de perfil de xve

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por xve (27 intervenciones) el 24/05/2016 21:43:27
No se entiende Isa!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por joesmecr (3 intervenciones) el 02/06/2016 20:04:21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
DataTable dt = new DataTable();
 
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
 
					new DataColumn("Name", typeof(string)),
 
					new DataColumn("Country",typeof(string)) });
 
dt.Rows.Add(1, "nombre ", "Pais");
 
dt.Rows.Add(2, "nombre ", "Pais");
 
dt.Rows.Add(3,"nombre ", "Pais");
 
dt.Rows.Add(4, "nombre ", "Pais");
 
GridView1.DataSource = dt;
 
GridView1.DataBind();
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por Daniel Alejandro Rosas Vazquez (7 intervenciones) el 27/05/2016 05:46:15
por ejemplo podrias hacer algo como esto

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
private DataTable GetDataTable()
{
    DataTable dt = new DataTable();
 
    dt.Columns.Add("cuenta");
    dt.Columns.Add("descripcion");
 
 
    DataRow row = dt.NewRow();
    row["cuenta"] = "1001";
    row["descripcion"] = "cuenta 1001";
    dt.Rows.Add(row);
 
    row = dt.NewRow();
    row["cuenta"] = "1002";
    row["descripcion"] = "cuenta 1002";
    dt.Rows.Add(row);
 
    row = dt.NewRow();
    row["cuenta"] = "1003";
    row["descripcion"] = "cuenta 1003";
    dt.Rows.Add(row);
 
    return dt;
}


aqui veras como crero manuelmente el datatable, podrias crerar tu metodo que procese el arraylist y lo convierta trabajando con los valores
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por DESARROLLA (1 intervención) el 28/05/2016 12:38:50
debes buscar el controlador para .net de mysql, cuando lo tengas cargado, veras que puedes realizar la conexion a la base mysql
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por lorena elideth (10 intervenciones) el 28/05/2016 14:47:38
1
2
3
4
5
6
7
8
9
10
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
					new DataColumn("Name", typeof(string)),
					new DataColumn("Country",typeof(string)) });
dt.Rows.Add(1, "Jonathan ", "Monterrey");
dt.Rows.Add(2, "Jesus México");
dt.Rows.Add(3, "Carlos", "Tijuana");
dt.Rows.Add(4, "Humberto", "Chile");
GridView1.DataSource = dt;
GridView1.DataBind();

Tal vez te sirva esto
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

necesito cargar funcionesmysql y afecten informacion cargada en mi grid asp.net

Publicado por Juan Carlos Zamora Alonso (3 intervenciones) el 03/06/2016 06:33:10
Hola puedes agregarlo con linq solamente en la datasourse le dices o especificas cual es la entidad agregas obviamente una DataContext y listo!! o lo agregas por codigo...!!!

1
2
3
4
5
6
7
8
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[1] { new DataColumn("Id", typeof(int)),
 
DataColumn("Country",typeof(string)) });
 
dt.Rows.Add(1, "a ", "a");
GridView1.DataSource = dt;
GridView1.DataBind();
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar