开发者

show only the selected column in the datagridview from xml using c#

I'm trying to show the datagridview with only selected column from the xml The Xml file look like this

<record>
<studentrecord firstname="james" lastname = "peter" id ="23"/>
<studentrecord firstname="kevin" lastname = "jerry" id ="12"/>
</record>

I can bring all the 3 attributes (firstname,lastname,id) in grid but i want only the firstname and id to be开发者_JAVA技巧 dispalyed in grid,Can anyone help?


dgv.Columns["lastname"].Visible = false;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜