将xml数据显示到datagrid特定列中 [英] display xml data in to datagrid specific columns
本文介绍了将xml数据显示到datagrid特定列中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友,
我正在尝试将xml数据显示到具有特定列的datagid中.
我正在使用Windows Mobile devise应用程序.
我有一个xml文件,该文件中有3个笨拙的R_ID,R_NAME,R_PROP.我在datagrid中绑定就可以了.这是一个严重的问题.当我绑定datagrid时,它会显示所有列.
我只想在数据网格中仅显示特定列,例如R_NAME,R_PROP.
任何人都有想法,请分享如何显示.
谢谢
Venkat.S
Hi Friends,
I m trying to display xml data in to datagid with specific columns .
I am using windows mobile devise application.
I have one xml file in that file have 3 clumns R_ID,R_NAME,R_PROP. I binded in datagrid its ok. here I have smale problem .when I bind datagrid its display all columns.
I want display only specific columns in datagrid like R_NAME,R_PROP only.
any one have idea please share how to display.
Thanks
Venkat.S
推荐答案
You can do the following:
1. Do not auto generate columns, set this property to false:
Datagridview1.AutoGenerateColumns=false;
2. Bind the XML
3. In the designer add the columns which you wish to display and set the
DataPropertyName to the attribute/property names.
Om Prakash,
感谢您重播
但是我正在使用Windows Mobile devise应用程序,但这里没有自动生成的列选项.因此,您还有其他方法可以做.
Hi Om Prakash,
thanks for replay
but i m using windows mobile devise app heare there is no auto genarated columns option.so u have any other way to do.
这篇关于将xml数据显示到datagrid特定列中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文