This is a migrated thread and some comments may be shown as answers.

Insert, Update and delete records from xml file

1 Answer 20 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 14 Mar 2011, 10:15 AM

Hello,

I'm a new developer of winforms.
I'm trying to insert, update and delete records from the following xml file using the treeview control (I'm using the 2009.3.9.1203 version):

"

<?xml version="1.0" encoding="utf-16"?>
<uTemplateData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://********************************************">
  <GoodData xmlns:dppp2="http://***************************************************************************">
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>73111160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
    <dppp2:LVPrm>
      <dppp2:Bnr i:nil="true" />
      <dppp2:CCount>2</dppp2:CCount>
      <dppp2:OSV>8542</dppp2:OSV>
      <dppp2:ParentId>0</dppp2:ParentId>
      <dppp2:RMM>2048</dppp2:RMM>
      <dppp2:bName i:nil="true" />
      <dppp2:bFvr>CHK</dppp2:bFvr>
      <dppp2:customSName></dppp2:customSName>
      <dppp2:hst>V42</dppp2:hst>
      <dppp2:mPath i:nil="true" />
      <dppp2:nNames xmlns:dppp4="http://********************************************************">
        <dppp4:string>MyName</dppp4:string>
      </dppp2:nNames>
      <dppp2:nGuids xmlns:dppp4="http://*********************************************************">
        <dppp4:string>My2Name</dppp4:string>
      </dppp2:nGuids>
      <dppp2:pArch>None</dppp2:pArch>
      <dppp2:sType>ATUP</dppp2:sType>
      <dppp2:uUM>false</dppp2:uUM>
      <dppp2:vtName>5u_4{Counter}</dppp2:vtName>
      <dppp2:vtType>mor</dppp2:vtType>
      <dppp2:trIp xmlns:dppp4="http://**********************************************************">
        <dppp4:mAd>7311160</dppp4:mAd>
        <dppp4:mFam>InterNetwork</dppp4:mFam>
        <dppp4:mHsh>0</dppp4:mHsh>
        <dppp4:mNmb xmlns:dppp5="http://*********************************************************">
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
          <dppp5:uShort>0</dppp5:uShort>
        </dppp4:mNmb>
        <dppp4:mScpId>0</dppp4:mScpId>
      </dppp2:trIp>
      <dppp2:tCrName>ctii_rl</dppp2:tCrName>
      <dppp2:tEName>Nwa</dppp2:tEName>
      <dppp2:tPName>AutoDefault</dppp2:tPName>
    </dppp2:LVPrm>
      
  
  </GoodData>
</uTemplateData>

 

"
You see that the above xml is more complex than the xml file which supported the treeview (XMLSerialization demo).
So, I'm asking you as new developer of winforms to help me step by step in order to insert, update and delete records from the above xml.

If the treeview is not intended for supporing such xml files, Please, guide me how to achieve the requirement using another control.

It is appreciated to send me a code with an explaination.

Regards,
Bader

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 16 Mar 2011, 05:34 PM
Hi Bader,

Using xml as datasource in RadTreeView has same principles as I have already described in the other forum thread about RadGridView. Take a look also at the specific tree view product documentation for more details.

Let me know if you have any additional questions.

Kind regards,
Martin Vasilev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Treeview
Asked by
Bader
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or