Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions


Posted on 2013-01-05
Last Modified: 2013-12-24
I have a Datagridview which I would like to load from XML into the DATAGRIDVIEW AND I want to freeze the name Column. I can load a xml file no problem using basic datagrid. But I donot think Datagid can freeze a column if it can please show me
here is datagrid
 Public Sub xmldatagrid()

            Dim ds As New DataSet

            ds.ReadXml("", XmlReadMode.InferSchema)
            DataGrid1.SetDataBinding(ds, "Listing")

        Catch ex As SqlException
        End Try
    End Sub

I can not use this with Datagridview. I need xml file to be read Starting at Listing Tag.
Here is the file
When I create the DataSet I get one column of tags leading up to Listing Tag. Please Help
Question by:powerztom

Accepted Solution

sognoct earned 500 total points
ID: 38748292
You can't freeze column in basic datagrid

Why can't you use datagridview ? Here is code for binding data to Listing tag

    Dim ds As New DataSet
    ds.ReadXml("", XmlReadMode.InferSchema)
    With DataGridView1  ' the datagridview
      .DataSource = ds
      .DataMember = "Listing"
      .AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
    End With

Then you can freeze the column that you want with no problem

Author Closing Comment

ID: 38806736

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question