PC Review


Reply
Thread Tools Rate Thread

Is this a datagrid/combo bug???

 
 
Jan Nielsen
Guest
Posts: n/a
 
      7th Nov 2003
Hi
I have a form with a combo and a datagrid

The combo has these properties:
Datasource: DataSet11.tPersoner
Displaymember: ChristianName
It does not have any databindings

The datagrid has these properties:
Dim dv As DataView = DataSet11.tPersoner.DefaultView
DataGrid1.DataSource = dv

Because I want different bindingmanagers for the two controls.

Now when I change the current cell in the datagrid (by clicking with the
mouse) they are not synchronized (which I donīt want them to be). But if I
sort the datagrid by clicking on a column header suddenly the combo shows
the ChristianName of an (appearantly random) row in the datagrid.

(I have created two different CurrencyManagers for the controls. And they
are not synchronized. their .Position are not the same)

It seems strange to me.

Any explanations?


best regards

Jan


 
Reply With Quote
 
 
 
 
Rajesh Patel
Guest
Posts: n/a
 
      7th Nov 2003
try to configure dataview without defaultview. means, configure thru
tablename property. and check

hope that helps

Rajesh Patel

"Jan Nielsen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> I have a form with a combo and a datagrid
>
> The combo has these properties:
> Datasource: DataSet11.tPersoner
> Displaymember: ChristianName
> It does not have any databindings
>
> The datagrid has these properties:
> Dim dv As DataView = DataSet11.tPersoner.DefaultView
> DataGrid1.DataSource = dv
>
> Because I want different bindingmanagers for the two controls.
>
> Now when I change the current cell in the datagrid (by clicking with the
> mouse) they are not synchronized (which I donīt want them to be). But if I
> sort the datagrid by clicking on a column header suddenly the combo shows
> the ChristianName of an (appearantly random) row in the datagrid.
>
> (I have created two different CurrencyManagers for the controls. And they
> are not synchronized. their .Position are not the same)
>
> It seems strange to me.
>
> Any explanations?
>
>
> best regards
>
> Jan
>
>



 
Reply With Quote
 
Jan Nielsen
Guest
Posts: n/a
 
      7th Nov 2003
Hi Rajesh
Thanks for answering.
That solved the problem. But did not explain why the original problem
arouse.

Thanks

Jan



"Rajesh Patel" <(E-Mail Removed)> skrev i en meddelelse
news:(E-Mail Removed)...
> try to configure dataview without defaultview. means, configure thru
> tablename property. and check
>
> hope that helps
>
> Rajesh Patel
>
> "Jan Nielsen" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi
> > I have a form with a combo and a datagrid
> >
> > The combo has these properties:
> > Datasource: DataSet11.tPersoner
> > Displaymember: ChristianName
> > It does not have any databindings
> >
> > The datagrid has these properties:
> > Dim dv As DataView = DataSet11.tPersoner.DefaultView
> > DataGrid1.DataSource = dv
> >
> > Because I want different bindingmanagers for the two controls.
> >
> > Now when I change the current cell in the datagrid (by clicking with the
> > mouse) they are not synchronized (which I donīt want them to be). But if

I
> > sort the datagrid by clicking on a column header suddenly the combo

shows
> > the ChristianName of an (appearantly random) row in the datagrid.
> >
> > (I have created two different CurrencyManagers for the controls. And

they
> > are not synchronized. their .Position are not the same)
> >
> > It seems strange to me.
> >
> > Any explanations?
> >
> >
> > best regards
> >
> > Jan
> >
> >

>
>



 
Reply With Quote
 
Raj
Guest
Posts: n/a
 
      14th Nov 2003
because, when you work directly work with datatable. it's actually
work with defaultview. so, indirectly, you were binding same
currencymanagers for 2 controls. now, you created exclusive dataview
with different currencymanagers and it works

Rajesh Patel

"Jan Nielsen" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi Rajesh
> Thanks for answering.
> That solved the problem. But did not explain why the original problem
> arouse.
>
> Thanks
>
> Jan
>
>
>
> "Rajesh Patel" <(E-Mail Removed)> skrev i en meddelelse
> news:(E-Mail Removed)...
> > try to configure dataview without defaultview. means, configure thru
> > tablename property. and check
> >
> > hope that helps
> >
> > Rajesh Patel
> >
> > "Jan Nielsen" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi
> > > I have a form with a combo and a datagrid
> > >
> > > The combo has these properties:
> > > Datasource: DataSet11.tPersoner
> > > Displaymember: ChristianName
> > > It does not have any databindings
> > >
> > > The datagrid has these properties:
> > > Dim dv As DataView = DataSet11.tPersoner.DefaultView
> > > DataGrid1.DataSource = dv
> > >
> > > Because I want different bindingmanagers for the two controls.
> > >
> > > Now when I change the current cell in the datagrid (by clicking with the
> > > mouse) they are not synchronized (which I donīt want them to be). But if

> I
> > > sort the datagrid by clicking on a column header suddenly the combo

> shows
> > > the ChristianName of an (appearantly random) row in the datagrid.
> > >
> > > (I have created two different CurrencyManagers for the controls. And

> they
> > > are not synchronized. their .Position are not the same)
> > >
> > > It seems strange to me.
> > >
> > > Any explanations?
> > >
> > >
> > > best regards
> > >
> > > Jan
> > >
> > >

> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid combo box selection not showing in datagrid JL3574 l Microsoft C# .NET 0 19th Oct 2005 05:47 PM
Combo Box in a datagrid Dave Microsoft ASP .NET 1 21st Jun 2004 07:42 AM
Combo box in DataGrid Arpan Bhatia Microsoft Dot NET Framework Forms 3 6th Jan 2004 10:29 PM
DataGrid and Combo Uri Dimant Microsoft VB .NET 3 26th Nov 2003 12:24 PM
Combo Box in DataGrid Elmer Microsoft Dot NET Framework Forms 2 8th Oct 2003 10:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:58 AM.