?
Solved

VS 2008 C# RowHeaderVisible

Posted on 2010-01-12
2
Medium Priority
?
373 Views
Last Modified: 2012-05-08
I have attached a screenshot of my data grid as it appears on the screen. What I am trying to eliminate is the column on the far left-hand side. I have the line in my code datagridQuoteDetail.RowHeaderVisiable set to false. Is it in the right place? Is it the correct command?
qdCommand.CommandText = "SELECT LINE_NUMBER_OEQL,PART_NUMBER_OEQL,QUOTE_QUANTITY_OEQL,PART_DESCRPTION_OEQL,UNIT_OF_MEASURE_OEQL,VENDOR_QUOT_CST_OEQL,VENDOR_QUOT_QTY_OEQL,VENDOR_QT_DATE_OEQL,VENDOR_#_QUOTE_OEQL,QUOTE_SELL_PRIC_OEQL,DELIVERY_TEXT_OEQL,QT_LINE_COMMENT_OEQL from SOPLINES s1, CSTQUTLN s2 where s1.QUOTE_NUMBER_SOPL=s2.QUOTE_NUMBER_OEQL and s1.SEQUENCE_NUMBER_SOPL=s2.SEQUENCE_NUMBER_OEQL and s1.REVALIDATE_NUMBER_SOPL=s2.REVALIDATE_NUMB_OEQL AND S1.LINE_NUMBER_SOPL=S2.LINE_NUMBER_OEQL AND s1.sopnumbe_sopl = '" + sopEntryWindow.SopNumber.Value + "' ORDER BY S2.LINE_NUMBER_OEQL";

            DataAdapter = new System.Data.SqlClient.SqlDataAdapter();
            DataAdapter.SelectCommand = qdCommand;
            DataAdapter.TableMappings.Add("Table", "QuoteDetail");

            DataAdapter.Fill(QuoteDetailDataSet);

            datagridQuoteDetail.ReadOnly = true;
            datagridQuoteDetail.RowHeadersVisible = false;
            datagridQuoteDetail.DataSource = QuoteDetailDataSet.Tables["QuoteDetail"].DefaultView;
            datagridQuoteDetail.Columns[0].Width = 40;
            datagridQuoteDetail.Columns[0].DefaultCellStyle.Format = "N2";
            datagridQuoteDetail.Columns[0].HeaderText = "Line Number";
            datagridQuoteDetail.Columns[1].Width = 100;
            datagridQuoteDetail.Columns[1].HeaderText = "Part Number";
            datagridQuoteDetail.Columns[2].Width = 40;
            datagridQuoteDetail.Columns[2].HeaderText = "QTY";
            datagridQuoteDetail.Columns[3].Width = 200;
            datagridQuoteDetail.Columns[3].HeaderText = "Part Description";
            datagridQuoteDetail.Columns[4].Width = 40;
            datagridQuoteDetail.Columns[4].HeaderText = "U/M";
            datagridQuoteDetail.Columns[5].Width = 60;
            datagridQuoteDetail.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            datagridQuoteDetail.Columns[5].DefaultCellStyle.Format = "c";
            datagridQuoteDetail.Columns[5].HeaderText = "Vendor Cost";
            datagridQuoteDetail.Columns[6].Width = 40;
            datagridQuoteDetail.Columns[6].HeaderText = "Vendor Quantity";
            datagridQuoteDetail.Columns[7].Width = 40;
            datagridQuoteDetail.Columns[7].HeaderText = "Quote Date";
            datagridQuoteDetail.Columns[8].Width = 40;
            datagridQuoteDetail.Columns[8].HeaderText = "Vendor Number"; 
            datagridQuoteDetail.Columns[9].Width = 60;
            datagridQuoteDetail.Columns[9].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            datagridQuoteDetail.Columns[9].DefaultCellStyle.Format = "c"; 
            datagridQuoteDetail.Columns[9].HeaderText = "Sell Price";
            datagridQuoteDetail.Columns[10].Width = 40;
            datagridQuoteDetail.Columns[10].HeaderText = "Delivery";
            datagridQuoteDetail.Columns[11].Width = 40;
            datagridQuoteDetail.Columns[11].HeaderText = "Comment";

Open in new window

QuoteScreen2.bmp
0
Comment
Question by:rwheeler23
[X]
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
2 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 26297371
It is displaying properly right? I don't see any problem or am I missing something.
0
 

Accepted Solution

by:
rwheeler23 earned 0 total points
ID: 26297752
No, I do not want it to appear at all. I thought this setting would eliminate it but it still appears.

  datagridQuoteDetail.RowHeadersVisible = false;
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 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