I have a dataset with two tables.
I make data view of each table, connect the parent table to one data grid
and the child table to the other datagrid, with a row filter, that gets set
when a user clicks a row in the parent.
I have PK/FK in the tables to know what to display.
I want to hide the PK/FK columns in the U/I, but still use them.
I can't seem to find a way to do this.
Any help would be appreciated.
Thanks,
Shane 5 1492
Shane Story wrote: I have a dataset with two tables.
I make data view of each table, connect the parent table to one data grid and the child table to the other datagrid, with a row filter, that gets set when a user clicks a row in the parent.
I have PK/FK in the tables to know what to display.
I want to hide the PK/FK columns in the U/I, but still use them.
I can't seem to find a way to do this.
Any help would be appreciated.
Thanks,
Shane
You have to assign a DataGridTableSt yle to the datagrid. Then when you
attach the DataSource only columns that have a DataGridColumnS tyle will
be shown but you can still access the other column from the datasource.
Hope this helps.
Chris
"Shane Story" <sstoryREMOVETH IS at lburgus dot com> wrote in message
news:ej******** *****@TK2MSFTNG P09.phx.gbl... I have a dataset with two tables.
I make data view of each table, connect the parent table to one data grid and the child table to the other datagrid, with a row filter, that gets set when a user clicks a row in the parent.
I have PK/FK in the tables to know what to display.
I want to hide the PK/FK columns in the U/I, but still use them.
I can't seem to find a way to do this.
Any help would be appreciated.
Thanks,
Shane
Is this ASP.Net or WinForms? Not sure how to do the equivalent in WinForms,
but in ASP.Net you would handle the DataGrid_DataIt emBound event. Check to
see if e.Item.ItemType is the type you want to mess with, then convert
e.Item.DataItem .Row to your DataRow. That would give you all values for the
DataItem that was bound.
HTH,
Mythran
It is a Win forms app. I already have it doing this... just have problems
because I need to hide columns and the one I need to hide is the PK in the
parent that I need to use for hidden FK in the child.
"Mythran" <ki********@hot mail.comREMOVET RAIL> wrote in message
news:uy******** ******@TK2MSFTN GP14.phx.gbl... "Shane Story" <sstoryREMOVETH IS at lburgus dot com> wrote in message news:ej******** *****@TK2MSFTNG P09.phx.gbl...I have a dataset with two tables.
I make data view of each table, connect the parent table to one data
grid and the child table to the other datagrid, with a row filter, that gets set when a user clicks a row in the parent.
I have PK/FK in the tables to know what to display.
I want to hide the PK/FK columns in the U/I, but still use them.
I can't seem to find a way to do this.
Any help would be appreciated.
Thanks,
Shane
Is this ASP.Net or WinForms? Not sure how to do the equivalent in
WinForms, but in ASP.Net you would handle the DataGrid_DataIt emBound event. Check
to see if e.Item.ItemType is the type you want to mess with, then convert e.Item.DataItem .Row to your DataRow. That would give you all values for
the DataItem that was bound.
HTH, Mythran
Thanks for the link.
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. .. Shane,
Did you already have a look at our website, it is based on VBNet and has a lot of samples for the Datagrid.
http://www.windowsformsdatagridhelp.com/default.aspx
I hope this helps,
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrew Chen |
last post by:
How do I hide any particular DataGrid Cell from visible,
or any DataColumn for the matter?
|
by: Das |
last post by:
Hi everyone,
I'm using datagrid control to display the data. I want to hide column to be
displayed into the data grid. I'm using the code as given below:
Method given below is used to bind the data grid with the db:
public static void DataGrid(DataGrid DG,string sql)
{
//Initialize connection with the db
|
by: Tim |
last post by:
Hi,
I am trying to hide the datagrid row header (the left most column that has
the 'select' triangle in it which moves with the selected row). It seems to
be fairly simple; this.dgStockMasterSummary.RowHeadersVisible = false;
however it doesn't hide it. Hiding the column headers works just fine.
Does anyone have any ideas?
|
by: J Gao |
last post by:
Hi All,
I am using Data binding with DataGrid. I need to hide column in the grid
using
DataGrid1.Columns(1).Visible = False
But I get the following error message
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
|
by: Thanh Nu |
last post by:
Hi,
I would like to hide a column in a web datagrid (with
create columns automatically at runtime checked), and I
cannot refer to the columns collection like this:
DataGrid1.Columns(0).Visible = False
(the message at runtime is something like index out of
range, and under the debuger, I discover that the
attribute count of the columns collection is 0!)
Below is my piece of code.
| |
by: Hanson |
last post by:
I have a datagrid control in an aspx page. The datagrid columns will be
dynamically generated according to the pre-page's search condition, I want
to hide some columns in the datagrid. is that anyway to do that?
|
by: sivaraman.S |
last post by:
Hi friends,
How to hide a column in datagrid.
regards,
Sivaraman.S
|
by: J |
last post by:
Ok, they have changed a lot of stuff in VB.net. How in the world do you hide a column on the Datagrid?
--
Jason
|
by: nuhura01 |
last post by:
Hi all..
I have a datagrid in my system and I preview the datagrid in other
html page. Below are the code that I'm using:
Dim oStringWriter As System.IO.StringWriter = New
System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New
System.Web.UI.HtmlTextWriter(oStringWriter)
|
by: moondaddy |
last post by:
using c# 3.5 I have list of business objects which I will use in lists for
databinding and I want to hide some of the fields so they don't show up in
the list control.
some of my list will be:
List<someClasslist
Observable collections
and
a custom list derived from the BindingList.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |