 |
| General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

October 7th, 2004, 03:34 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hiding / unhiding columns in datagrid
Hi guys,
how do i trigger events when after enetering 1-5 from first col it will unhide 3 columns and if i enter beyond this it will hide 3 columns in datagrid
hope u understand it,
tnx in advanced
|
|

October 8th, 2004, 01:56 AM
|
|
Friend of Wrox
|
|
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi drachx,
I guess what you think off is not a feasible solution because you said if the value is 1-5 you need to show 3 columns and if it is not that then you need to hide 3 columns, but think there are 3 records already with values 1-5 in the first column so you need to display the 3 columns, but if you add new record that contains say 6 you need to hide 3 columns but for the first 3 records where you had values 1-5 you won't be able to see the values in the three columns, because you need to hide the columns for new the new record.
So think of some other solution like having text box.
but if you want you can make the column as readonly by using the following code
dataGrid1.TableStyles[0].GridColumnStyles["Asd"].ReadOnly = true;
It is not how much we do,
but how much love we put in the doing.
-Mother Theresa
|
|

October 10th, 2004, 09:33 PM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi pradeep,
thats what i want
this is abt acctng system, actual scenario is first column indatagrid is combo box which hav a lookup , when it choose cash in bank it will unhide addtl 3 columns to enter addtl data and then for another row if its not cash in bank then the normal no. of colmns it wiil display, the user dont need to see the 3 columns unless he go back to row that contains cashin bank then it will show up again,they hav the program now written in vb6 but they dont hav the source code, as ive said before,
hope to hear u soon
thnx
|
|

October 11th, 2004, 01:23 AM
|
|
Friend of Wrox
|
|
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The grid they use only for entering the records is it? or they are using that for viewing the records also? If they are using for entering alone, then we can try something with grid But I am not sure how to do that?
Can we do the same in TextBox?
It is not how much we do,
but how much love we put in the doing.
-Mother Theresa
|
|

October 11th, 2004, 01:38 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
both, its for entering data and viewing also when they need to edit their inputs, users normally have to inputs lots of data so they are keen in keyboards and not depending on mouse
|
|

October 11th, 2004, 01:56 AM
|
|
Friend of Wrox
|
|
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
What I am thinking is that hoe to implement both the functionalities with the same grid? Let me think and get back to you!
It is not how much we do,
but how much love we put in the doing.
-Mother Theresa
|
|

October 12th, 2004, 07:40 PM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi guys, really need ur help in datagrid
we have existing program in vb6 with no source code , it is an accounting system, the user inputs lots of data in datagrid,
the first column have a combo box which has a lookup ( see my previous post) if it choose cash in bank it will unhide 3 colmns to enter addtl data, and for another row if its not cash in bank it will unhide 3 columns, this happens in their program written in vb6,
i have my combobox now in my first column, teh only problem is hiding and unhiding columns
tnx in advanced
|
|

October 15th, 2004, 12:38 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi guys, really need ur help in datagrid
we have existing program in vb6 with no source code , it is an accounting system, the user inputs lots of data in datagrid,
the first column have a combo box which has a lookup ( see my previous post) if it choose cash in bank it will unhide 3 colmns to enter addtl data, and for another row if its not cash in bank it will unhide 3 columns, this happens in their program written in vb6,
i have my combobox now in my first column, teh only problem is hiding and unhiding columns
tnx in advanced
|
|

October 16th, 2004, 06:19 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
bind the grid first
Add bound columns
chk for the condition of the selected item of combo
Datagrid1.Columns(0).Visible=False/true
accordingly
|
|

October 18th, 2004, 02:37 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Datagrid1.Columns(0).Visible=False/true
there is no columns property in datagrid
|
|
 |