Click here to Skip to main content
15,896,111 members

When i hide the partiuclar column i dont want to hide the Date and session how to validate

Member 8054539 asked:

Open original thread
when i hid the particular column i don't want to hid the date and session in data grid view.


for that how to validate.


Hide button code as follows;

C#
if (MessageBox.Show("Are You sure, You want to Hide?", "Hide confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
           datagridView.Columns[datagridView.CurrentCellAddress.X].Visible = false;
            }


Output as follows; Hide(Button)

DATE SESSION RK Mk CK VB GS CMK UNNI

1//2013 1


in that when i click the hide button,in that column values is there that validation is working fine. no problem.


But i don't to hide the DATE and SESSION Column always in data grid view.

for that validation how to write the code.
Tags: C#

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900