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;
精彩评论