Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:42:15+00:00 2026-06-12T16:42:15+00:00

I am new to c#, this may be very easy question. In my application

  • 0

I am new to c#, this may be very easy question.

In my application there is a Form in which I have datagridview dgvBill and a Button btnClick. I declared columns to it by clicking the extender and selecting add columns. After executing the form, I written some text to each column in dgvBill. When I click on btnClick it is creating an xml file but with no data in it. (why the data is not being added ?)

The created XML file looks like this:

<?xml version="1.0" standalone="yes"?>
<NewDataSet />

I have tried the below code:

btnClick Event

DataSet ds = new DataSet();
ds.WriteXml(@"..\..\Customer_Info\" + lblCustId.Text + ".xml");
dgvBill.DataSource = ds;  /* also tried ds.Tables[0] */

lblCustId is a label in the Form

Optional: can I make each cell of datagridview into ComboBox?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:42:17+00:00Added an answer on June 12, 2026 at 4:42 pm

    My problem solved when I created a new empty xml file (which has only created column names)
    and read the xml file in a dataset object (on form load event). I used the same dataset object to write on different xml file (on button click event). I am sure that this is not the correct way but it worked. Please post here if you have any other good suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to regular expression and this may be a very easy question
This may sound a newbie question however I'm new to iOS dev. Are there
I'm new to C++, so this may be a noobish question; I have the
I need your help, may be this question is very easy for you. I
this may sound a newbie question anyway Im new to GCD, I'm creating and
I am new to OO php so this may seem basic.. Basically I have
This may be a silly question, but as someone relatively new to PHP, I'm
I'm new to jQuery so this may be a real simple answer. I have
im really new to linq-to-SQL so this may sound like a really dumb question,
Ok, this may have been answered, but I'm new and trying to learn, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.