Here's another newbie question.
I've written a little module to read a XML file and display it in a
DataGrid.
My code looks like this:-
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
ds.ReadXml(openFileDialog1.FileName);
grdXML.DataSource = ds;
}
}
This works OK. But when it runs I get a little tree view in the top left
corner which expands to:-
DATAPACKET, METADATA, FIELDS, FIELD, PARAMS, ROWDATA, ROW
If I click on ROW, I get what I want. Question is ... how do I do that in
code, so the user doesn't have to do the clicking through a tree.
Also, what if the bottom level item isn't called ROW - say it is called
CUSTOMER - then how do I, in code, open the bottom level item without
knowing its name in advance.
Cheers
Jeff 2 2203
Hi
I asked this question a few days ago and either
1. It was a dumb question unworthy of answering!
2. The question is poorly phrased and no one understood it
or ( more likely)
3. I missed the answer
Here's hoping for a reply
Cheers
Jeff
"Jeff Cook" <jeffcATaspectDOTcoDOTnz> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl... Here's another newbie question.
I've written a little module to read a XML file and display it in a DataGrid.
My code looks like this:-
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
ds.ReadXml(openFileDialog1.FileName);
grdXML.DataSource = ds;
}
}
This works OK. But when it runs I get a little tree view in the top left corner which expands to:-
DATAPACKET, METADATA, FIELDS, FIELD, PARAMS, ROWDATA, ROW
If I click on ROW, I get what I want. Question is ... how do I do that in code, so the user doesn't have to do the clicking through a tree.
Also, what if the bottom level item isn't called ROW - say it is called CUSTOMER - then how do I, in code, open the bottom level item without knowing its name in advance. Cheers
Jeff
Hey Jeff
how does ur xml file look like
regards
Subramanian Iyuer
"Jeff Cook" <jeffcATaspectDOTcoDOTnz> wrote in message
news:ea**************@tk2msftngp13.phx.gbl... Hi
I asked this question a few days ago and either
1. It was a dumb question unworthy of answering! 2. The question is poorly phrased and no one understood it
or ( more likely)
3. I missed the answer
Here's hoping for a reply
Cheers
Jeff
"Jeff Cook" <jeffcATaspectDOTcoDOTnz> wrote in message news:uu**************@TK2MSFTNGP10.phx.gbl... Here's another newbie question.
I've written a little module to read a XML file and display it in a DataGrid.
My code looks like this:-
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
ds.ReadXml(openFileDialog1.FileName);
grdXML.DataSource = ds;
}
}
This works OK. But when it runs I get a little tree view in the top
left corner which expands to:-
DATAPACKET, METADATA, FIELDS, FIELD, PARAMS, ROWDATA, ROW
If I click on ROW, I get what I want. Question is ... how do I do that
in code, so the user doesn't have to do the clicking through a tree.
Also, what if the bottom level item isn't called ROW - say it is called CUSTOMER - then how do I, in code, open the bottom level item without knowing its name in advance. Cheers
Jeff
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Maria |
last post by:
Hi
I am new to .NET and would like to know how do we customize the apprearance of a datagrid
Precisely, I would like to make ONE row appear in BOLD, and I would like to specify the number of...
|
by: Michael Cairns |
last post by:
Im trying to work out how to select a row and change the
appearance of the selected row i a datagrid. I might also
try to show the details of a selected row on a panel in
the page. Is this...
|
by: Gidi |
last post by:
hi,
i have a dataGrid and few radio buttons.
i want that each time the radio buttons change the dataGrid dataSource and
dataMember will change to.
i know how to change the dataMember but when...
|
by: Carolyn Vo |
last post by:
I have been looking and looking but can't seem to find out how to get the row
selected in a web control datagrid (NOT a web form datagrid!!!), and how to
highlight the selected row. I'm sure this...
|
by: Amber |
last post by:
There are times when you will need to highlight or otherwise modify
the contents of a particular DataGrid row-column value based upon the
value in the column. In this example we will select the...
|
by: Daniel |
last post by:
Hi All,
I need to change the "1 2 3 4..." link button page browsing to 2 buttons
which are "<" button and ">" button.
is it possible? any guidelines?
your help will be appreciated.
thank...
|
by: Genojoe |
last post by:
I am using code from Help with two exceptions. (1) I increased the number of sample rows from 3 to 20, and (2) I anchored the datagrid to bottom of form so that I can change the size of the grid by...
|
by: Jesse Aufiero |
last post by:
Hi all,
I have a disabled datagrid on my form. Disabling it was, it seemed, the
only way to prevent the user from being able to change the selected row or
modify the appearance of the grid in...
|
by: Earl |
last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid
(VS2003)?
I've tried Ken's workaround...
|
by: Steve |
last post by:
WINDOWS C#
Is it possible to change the appearance of a particular Cell in a windows
forms datagrid? Font, colour or anything really, or does it have to be a
complete row or column?
Thanks
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |