attribute in XML file to gride view table?

send attribute in XML file to gride view table?

Page 1 of 1

1 Replies - 1302 Views - Last Post: 05 October 2009 - 10:20 AM Rate Topic: -----

#1 XMEGA   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 135
  • Joined: 17-November 08

attribute in XML file to gride view table?

Posted 05 October 2009 - 09:29 AM

This is in my XML file how can I post the attribute values to the grid? I can get the non-attribute easily such as location...

XML
  <cropType>
	<cropVarietyID>243</cropVarietyID>
	<crop shape="flat" size="2">corn</crop>
	<varietyName>Pioneer 3030</varietyName>
	<plot year="2009">
	  <location>Fred farm</location>
	  <yield>128</yield>
	</plot>
	<plot year="2008">
	  <location>Golden Acres</location>
	  <year>2008</year>
	  <yield>130</yield>
	</plot>
	<plot year="1998">
	  <location>Agricorps</location>
	  <yield>110</yield>
	</plot>
	<image>corn.bmp</image>
  </cropType>



if I want the field location or yield all I type is the name however how can I get "year" typing plot doesn't seem to work...

<Columns>
<asp:ImageField DataImageUrlField="image" DataImageUrlFormatString="~/images/{0}" HeaderText="Image"></asp:ImageField>
<asp:BoundField DataField="crop" HeaderText="Crop" />
<asp:BoundField DataField="cropVarietyID" HeaderText="Variety&lt;br/&gt;Shape &amp; Size" HtmlEncode="False" />
<asp:BoundField DataField="shape" HeaderText="TEST" />
</Columns>


^ I want to get the "shape" but doesn't seem to like it...

This post has been edited by XMEGA: 05 October 2009 - 10:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: attribute in XML file to gride view table?

#2 Aeternalis   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 291
  • Joined: 13-July 09

Re: attribute in XML file to gride view table?

Posted 05 October 2009 - 10:20 AM

Edited...

sorry I misread the question..

Aet

This post has been edited by Aeternalis: 05 October 2009 - 10:21 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1