PC Review


Reply
Thread Tools Rate Thread

Display results in datagrid

 
 
James Goodman
Guest
Posts: n/a
 
      7th Jun 2005
I have a form with three controls, a button and a datagrid.

The grid is bound to a dataset table.

When the button is pressed, a new row is added to the dataset table.

The datagrid table contains 3 int columns, plus an identity column. 2 of
these int columns are FK's to lookup tables.

In the SQL for the table I used an inner join to the lookup tables so grid
becomes populated with the data I want them to see (i.e. text not numbers).

When I insert the new row, because the row is uncomitted, the text columns
display as null. Once the new rows are comitted they display as expected.

I can understand why this happens, but are there any simple workarounds for
this, so I can display the data I want?

--
Cheers,

James Goodman


 
Reply With Quote
 
 
 
 
Earl
Guest
Posts: n/a
 
      8th Jun 2005
Not to be catty about an answer, but there is never a simple solution with a
JOINed query bound to a datagrid. If you are using it solely for display
purposes, I could see it, but anything requiring an insert or an update is
only going to lead to grief. You probably want to google some previous
issues on this.

"James Goodman" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:%(E-Mail Removed)...
>I have a form with three controls, a button and a datagrid.
>
> The grid is bound to a dataset table.
>
> When the button is pressed, a new row is added to the dataset table.
>
> The datagrid table contains 3 int columns, plus an identity column. 2 of
> these int columns are FK's to lookup tables.
>
> In the SQL for the table I used an inner join to the lookup tables so grid
> becomes populated with the data I want them to see (i.e. text not
> numbers).
>
> When I insert the new row, because the row is uncomitted, the text columns
> display as null. Once the new rows are comitted they display as expected.
>
> I can understand why this happens, but are there any simple workarounds
> for this, so I can display the data I want?
>
> --
> Cheers,
>
> James Goodman
>




 
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
Display SELECT results on two dates (datagrid and textbox in vb) steve-russell@hotmail.com Microsoft Dot NET Framework Forms 1 17th Nov 2006 02:48 AM
Getting only datagrid results? Brett Romero Microsoft C# .NET 7 15th Feb 2006 01:56 AM
Re: Datagrid: how cut short display of a long description in a datagrid column Brian K. Williams Microsoft ASP .NET 0 2nd Mar 2004 08:35 PM
RE: Datagrid: how cut short display of a long description in a datagrid column =?Utf-8?B?U3VyZXNo?= Microsoft ASP .NET 0 2nd Mar 2004 08:31 PM
Display SQL results in DataGrid Steven Smith Microsoft VB .NET 2 18th Dec 2003 04:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:14 PM.