none
Question about binding XML with DataGridView and ArrayList. RRS feed

  • Question

  • Dear all,

    The structure of XML file that I played with is as follows,

    <s>
    <p m="B">
    <i>1</i>
    <t>3</t>
    <r>5</r>
    </p>
    <p>
    <i>2</i>
    <t>Not applicable</t>
    <r>2</r>
    </p>...
    <p>...</p>
    </s>

    I wanna modify the XML file by editing the DataGridView, e.g. adding, deleting the rows in dvg. Meanwhile, all the latest data in the dvg has to be added to the ArrayList, e.g. all the cells data in the Row[0] will be added as the string ArrayList[0].

    Shall I use the untyped DataSet to bind the XML with Dvg or I should use BindingSource to make it? I found some arguments in your FAQ about BindingSource is the better one. How about the untyped dataSet? In some examples, only DataSet is applied, not the BindingSource.

    I have some ideas about binding the ArrayList, e.g. transform each row in the dvg to the temp array, then added the temp array to the ArrayList. Do you have any comment on it? Or any shortcut, or possibly, some codes?

    B.W.

    B-D.
    Tuesday, July 10, 2007 11:49 PM

Answers