Paolol,
First off, you will want to change the call to the Enabled property to
be:
dataGrid1.Enabled = true;
Calling Equals does not set the value, rather, it performs a comparison.
Also, when you are setting the data source, I don't know if the columns
are autoconfigured. You might want to check the TableStyles property on the
grid to see if there are any column mappings (after you bind to the data).
If not, you will have to create the columns yourself.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"paolol" <paolol@_nospamma_salsan.net> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
Hi,
I try to load an XML file on a Grid but I don't see the data, only the
fields.
Any suggestion ??? code is :
DialogResult res=openFileDialog1.ShowDialog(this);
if (res==DialogResult.OK)
{
string fn=openFileDialog1.FileName;
dataset11.ReadXml(fn);
textBox1.Text=fn;
dataGrid1.DataSource=dataset11;
dataGrid1.DataMember="product";
dataGrid1.Enabled.Equals(true);
}
thanks,
paolol