Sunday, April 3, 2011

export datagrid to xml -plz give any other way

1 vote down star

please help me out to export a datagrid to an xml i used two ways but both exception are coming

DataTable dt = (DataTable)dataGrid2.DataSource; dt.WriteXml("t.xml",XmlWriteMode.IgnoreSchema);

in this exception like this arises Cannot serialize the DataTable. DataTable name is not set. (invalidoperationexception). please give a suitable method to export a datagrid to xml i even tried giving name to the dataTable still exception comes please help me with serialize

From stackoverflow

0 comments:

Post a Comment