Click here to Skip to main content
15,901,122 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help with assembly load Pin
Heath Stewart10-Sep-04 6:16
protectorHeath Stewart10-Sep-04 6:16 
GeneralRe: Help with assembly load Pin
GeloSoft10-Sep-04 7:10
GeloSoft10-Sep-04 7:10 
GeneralRe: Help with assembly load Pin
Heath Stewart10-Sep-04 7:15
protectorHeath Stewart10-Sep-04 7:15 
GeneralRe: Help with assembly load Pin
GeloSoft11-Sep-04 14:35
GeloSoft11-Sep-04 14:35 
GeneralRe: Help with assembly load Pin
Heath Stewart11-Sep-04 16:03
protectorHeath Stewart11-Sep-04 16:03 
GeneralRe: Help with assembly load Pin
GeloSoft11-Sep-04 16:44
GeloSoft11-Sep-04 16:44 
GeneralRe: Help with assembly load Pin
Charlie Williams11-Sep-04 19:12
Charlie Williams11-Sep-04 19:12 
GeneralWinform DataGrid HELP HELP! Pin
Looney Tunezez10-Sep-04 5:53
Looney Tunezez10-Sep-04 5:53 
Hey,
This is driving me up the wall!
Some one please help,please please!
Heres the situation

I have a set of 3 grids.

They bind correctly as follows

//Parent Grid
dataGrid1.DataSource=parent;

//Child Grid
dataGrid2.DataSource=parent;
dataGrid2.DataMember="Parent.Child";

//Grand Child Grid
dataGrid3.DataSource=parent;
dataGrid3.DataMember="Parent.ChildToGrandChild";

The relation works beautifully.Been working for months now.

Here is the issue:
I have to filter out data in the child grid ie dataGrid2, which in turn will affect dataGrid3 which is fine.

I have tried using the RowFilter property of the DefaultView exposed by the DataTable, but to no avail. Filter does not take effect and it renders all the rows.

These are the methods i have tried.

1. ((System.Data.DataTable) dataGrid2.DataSource).ChildRelations["Parent.Child"].ChildTable.DefaultView.RowFilter = " [FilterMeNow] = '1'";
does not work.

2. I tried setting up the filter before establishing the databinding but after the relation is set, again it wont work.
e.g. patient.DataSet.Tables[1].DefaultView.RowFilter="[FilterMeNow]= '1'";
dataGrid2.DataSource=patient;
dataGrid.DataMember="Parent.ToChild";

3. Googling it leads to me to think setting the row filter is the way to go....but nothing seems to happen. Though it works for me when i am using it on a single non-relationed datagrid.

I know RowFilter works because I have been using it for single grid all year long.

So how do i go about using it in master-child relation datagrid.

Am I just supposed to refresh the grids after they are bound, resulting in the row filter to take affect. If so, how?

Desperate plead other wise i will have to write 2 procedures, one with filtered data and one without filtered data. which to me seems absolutely horrendous, kind of defeating the whole purpose of the row filter functionality. so please rescue me from this !

Frusturated Looney Tunezez


Cheers!
<bold>Looney Tunezez

"If you build it....
.....BUGS will come!" -JB


Application.Run(new Form1(this.Dispose())); <--WHAT :wtf::confused::eek:


"Stability. What an interesting concept" - Chris Maunder
<bold>

Questionlocal/global variables? Pin
Heks10-Sep-04 5:43
Heks10-Sep-04 5:43 
AnswerRe: local/global variables? Pin
Gary Thom10-Sep-04 6:10
Gary Thom10-Sep-04 6:10 
GeneralRe: local/global variables? Pin
Heks10-Sep-04 6:52
Heks10-Sep-04 6:52 
GeneralRe: local/global variables? Pin
Gary Thom10-Sep-04 13:16
Gary Thom10-Sep-04 13:16 
GeneralRe: local/global variables? Pin
Heks10-Sep-04 15:05
Heks10-Sep-04 15:05 
GeneralRe: local/global variables? Pin
Gary Thom11-Sep-04 1:32
Gary Thom11-Sep-04 1:32 
Generaltext files, WinME Pin
Pensioner10-Sep-04 4:55
Pensioner10-Sep-04 4:55 
GeneralRe: text files, WinME Pin
Heath Stewart10-Sep-04 6:50
protectorHeath Stewart10-Sep-04 6:50 
GeneralRe: text files, WinME Pin
Pensioner11-Sep-04 1:35
Pensioner11-Sep-04 1:35 
GeneralRe: text files, WinME Pin
Heath Stewart11-Sep-04 16:01
protectorHeath Stewart11-Sep-04 16:01 
GeneralRe: text files, WinME Pin
Pensioner11-Sep-04 21:00
Pensioner11-Sep-04 21:00 
GeneralRe: text files, WinME Pin
Pensioner23-Sep-04 5:34
Pensioner23-Sep-04 5:34 
GeneralDataGrid VSrollBar Does't work Pin
Steve4510-Sep-04 4:26
Steve4510-Sep-04 4:26 
GeneralCatch a Disconnect event in Client-Server Socket enviroment Pin
Gian10-Sep-04 4:24
Gian10-Sep-04 4:24 
GeneralRe: Catch a Disconnect event in Client-Server Socket enviroment Pin
Dave Kreskowiak10-Sep-04 6:53
mveDave Kreskowiak10-Sep-04 6:53 
Generalhelp in windows services Pin
jacal9910-Sep-04 2:48
jacal9910-Sep-04 2:48 
GeneralRe: help in windows services Pin
Dave Kreskowiak10-Sep-04 4:40
mveDave Kreskowiak10-Sep-04 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.