PC Review


Reply
Thread Tools Rate Thread

DataGridView Inserted Column showing no data

 
 
LuvinLunch
Guest
Posts: n/a
 
      17th Nov 2010
Hi,

I’m loading a datagridview and once it’s loaded I’m adding a new
column that combines two of the columns into one. So i’m doing a
string concatenate of two cols into the new column I’ve inserted.
When I debug I can see that the string is populating into the new
column and when I finish debugging I can see that the new column is
inserting into the grid but the column is empty when the grid is fully
loaded. Anyone any ideas why?

Just to confuse me further, the code that creates the new column,
populates it and inserts is called on a different form and works
perfectly. I’ve isolated my page to make sure that I’m calling the
correct grid so it’s not that I’m writing to the wrong grid. I’ve
also tried hard coding a string to the inserted column but it’s not
showing that.

I thought it had to be a setting on the grid that’s not working but
I’ve replaced the non-working grid with the working grid but it’s
still now working.

Could anyone suggest anything I could try as at the moment I’m
stumped?

Thanks

LL
 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      17th Nov 2010
Luvin,

Just an advice, get away from regarding to the DataGridView as a kind of
Excel replacement.

It is a Data control, which assumes that it can be used with a List,
Collection or Dataset/Datatable to call some.

In those you can combine easily values of columns or properties.

Cor

"LuvinLunch" wrote in message
news:19a57993-8516-4368-b4bb-(E-Mail Removed)...

Hi,

I’m loading a datagridview and once it’s loaded I’m adding a new
column that combines two of the columns into one. So i’m doing a
string concatenate of two cols into the new column I’ve inserted.
When I debug I can see that the string is populating into the new
column and when I finish debugging I can see that the new column is
inserting into the grid but the column is empty when the grid is fully
loaded. Anyone any ideas why?

Just to confuse me further, the code that creates the new column,
populates it and inserts is called on a different form and works
perfectly. I’ve isolated my page to make sure that I’m calling the
correct grid so it’s not that I’m writing to the wrong grid. I’ve
also tried hard coding a string to the inserted column but it’s not
showing that.

I thought it had to be a setting on the grid that’s not working but
I’ve replaced the non-working grid with the working grid but it’s
still now working.

Could anyone suggest anything I could try as at the moment I’m
stumped?

Thanks

LL

 
Reply With Quote
 
LuvinLunch
Guest
Posts: n/a
 
      23rd Nov 2010
Hey Cor,

I appreciate the advice as I'm just learning .net. Are you suggesting
that I need to combine my data in the database and only use the
DataGridView to render my data? If not, what would you suggest I use?
I'm migrating code and haven't re-written the stored procedures so
that could be my problem.

Thanks

LL
 
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
Accessing DataGridView column data as an IList =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= Microsoft C# .NET 3 20th Mar 2007 04:53 PM
Displaying a two column combo box and showing value from column 1 but saving clolumn 2 data. esung911@aol.com Microsoft Access Forms 2 22nd Feb 2007 12:07 AM
datagridview row background color based on column value in data va =?Utf-8?B?R3JlZyBMYXJzZW4=?= Microsoft C# .NET 1 27th Dec 2006 10:03 AM
datagridview cell - get row/column info for updating data- how? =?Utf-8?B?UmljaA==?= Microsoft VB .NET 3 26th May 2006 08:42 PM
Customise datagridview column does not bind into data field ? Tsair Microsoft Dot NET Framework Forms 0 2nd Apr 2006 06:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 AM.