DataGrid

  • Thread starter Thread starter Maxim
  • Start date Start date
M

Maxim

Hi, everybody!

I've got a couple of questions.

I have a DataSet containing several Tables. DataSet is populating from XML
file, which is being prepared by desktop app.
First of all, I have problems when trying to read schema & data from XML. So
I read xsd-file with no problems. Then I get exception when trying to read
data. There are no problems when I read XML data file alone. So I need to
manually modify XML data file to insert empty tables and empty elements,
because empty tables are not put into XML. The same is with null elements.
What is wrong here?

Second question is about DataGrid. I'd like to display some of the Tables in
DataSet in a DataGrid. That's OK. But when I show a Table in Grid all the
columns are diaplayed. But I need only a small number of culumns to be
displayed. How do I do that?
Also is there a possibility to display ComboBox & CheckBox in Grid cells?

Sorry for my probably stupid questions, but I'm new to .NET and I couldn't
find answers in MSDN. And thanks in advance.

PS. Using .NET CF 2.0.
 
RE: XML
Not sure why your XSD would require empty tables and fields?
This is probably the issue, not the fact that your XML is missing these
empty fields.
Check your XSD.

RE: Datagrid columns
You need to check out DataGridTableStyle and DataGridTextboxColumn
 
Look up DataView. Link just the columns you want to the DataView, then
use the dataview as the data source for your grid.
 
Look up DataView. Link just the columns you want to the DataView, then
use the dataview as the data source for your grid.
 
Back
Top