?
Solved

VS 2008 C# RowHeaderVisible

Posted on 2010-01-12
2
Medium Priority
?
377 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
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

621 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