Solved

Need to remove a column being displayed in the datagrid.

Posted on 2008-06-25
2
216 Views
Last Modified: 2013-12-16
If you look at the image attached with the added in new list datagrid

I would first like to remove the GRADE_CODE_DTL_ID
and then rename GRADE_NAME to Grade Name
and then rename STRGHT_PRICE_AMT to Straight Price Amount
============================================================
System.Data.DataSet DataSetDelete = new System.Data.DataSet();
            System.Data.DataSet DataSetChange = new System.Data.DataSet();
            System.Data.DataSet DataSetAdded = new System.Data.DataSet();
            string Status = null;
            InitialPriceReporting.InitialPriceReportingServiceWS.InitialPriceReportingService WS = new InitialPriceReporting.InitialPriceReportingServiceWS.InitialPriceReportingService();

            DataSetAdded = WS.ComparePriceListAdded(previousID, dr["PRICE_LIST_HDR_ID"].ToString(), ref Status);

          AddedDataGridView.DataSource = DataSetAdded.Tables[0];

I call a webservice to return a dataset called DataSetAdded. How can I modify the names added in the datasetadded.



0
Comment
Question by:mathieu_cupryk
2 Comments
 
LVL 16

Accepted Solution

by:
burakiewicz earned 500 total points
ID: 21868021
DataSetAdded.Tables[0].Columns.Remove("GRADE_CODE_DTL_ID ");
DataSetAdded.Tables[0].Columns["GRADE_NAME"].ColumnName = "Grade Name";
DataSetAdded.Tables[0].Columns["STRGHT_PRICE_AMT"].ColumnName = "Straight Price Amount";
0
 

Author Comment

by:mathieu_cupryk
ID: 21868412
smart guy!!!

Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now