cómo agregar dos conjuntos de datos a una tabla de vista de cuadrícula

ds = server.ExecuteQuery(CommandType.Text, MysqlStatement, param);
ds1 = server.ExecuteQuery(CommandType.Text, getOwnMsgQuery, param);
Grid_Messagetable.DataSource =ds;
Grid_Messagetable.DataSource = ds1;

I have to do two different query to get data for a grid table, but in this case it is showing only result from ds1 as it is executed after ds. How can I do this. Thanks

preguntado el 08 de noviembre de 11 a las 15:11

Well what you are doing is like int i=0; i=1; int k=i; como resultado k is 1, please check Icarus's answer for solution. -

1 Respuestas

If both datasets have largely the same schema, you could merge them before binding to the grid:

Grid_Messagetable.DataSource = ds;

Mira aquí.

respondido 08 nov., 11:19

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.