Re: DataGrid and XML document
From: Thejus (thejus_raghavan_at_hotmail.com)
Date: 06/28/04
- Next message: Miha Markic [MVP C#]: "Re: sample code"
- Previous message: M Ali: "Multiple Object Serialization seperately in single file (something like olestorages)"
- In reply to: Jussi: "DataGrid and XML document"
- Next in thread: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Reply: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Reply: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Jun 2004 07:13:19 -0500
Hi,
When I read from a XML Document and assign -
DataSet.ReadXml(@"C:\Abc.Xml",XmlReadMode.Auto);
DataGrid.DataSource = DataSet;
I get the DataGrid filled, but the data is not filled in the datagrid. It
shows Table Name as a link, on clicking of which the grid is filled. Even
the DataGrid.Expand(-1) do not expand the rows.
Is there any way for this?
Thanks
Thejus
"Jussi" <a.a@a.com> wrote in message news:eeY$LjhSEHA.2692@TK2MSFTNGP09.phx.gbl...
> I load a XML document in the DataGrid:
>
> private System.Windows.Forms.DataGrid myDataGrid = new DataGrid();
> private DataSet m_myDataSet = new DataSet();
>
> m_myDataSet.ReadXml(@"C:\...\MyDocument.xml");
> myDataGrid.DataSource = m_myDataSet;
>
> This works fine and user can edit the loaded document. The problem is that I
> don't want to give possibility to change the structure of the
> MyDocument.xml. User should only change data in the already existing fields.
> In the DataGrid user can create for example new rows and these are saved to
> the MyDocument.xml when
>
> m_myDataSet.WriteXml(@"C:\...\MyDocument.xml");
>
> is done and MyDocument.xml is corrupted. Is there a way to avoid this?
>
> -JK
>
>
- Next message: Miha Markic [MVP C#]: "Re: sample code"
- Previous message: M Ali: "Multiple Object Serialization seperately in single file (something like olestorages)"
- In reply to: Jussi: "DataGrid and XML document"
- Next in thread: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Reply: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Reply: Ashutosh Ambekar: "Re: DataGrid and XML document"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|