Forum  General Visual ...  Visual WebGui v...  [Solved] DataGridView with DataTable. Columns properties can not be set
Previous Previous
 
Next Next
New Post 8/3/2011 11:41 AM
Resolved
  tejuguasu
4 posts
No Ranking


[Solved] DataGridView with DataTable. Columns properties can not be set 
Modified By tejuguasu  on 1/13/2012 12:36:32 PM)

I am using VWG 6.4, Oracle 10g XE.

Usually I populate a DataTable with a table or a view from db, and assign it as DataGridView's DatasSet.

A problem arises for one table (and a view involved with the table), after assigning the DataSet the column properties changes takes no effect. All the columns are shown and the .Text, .Visible or .DisplayIndex takes no effect.

The columns data types are decimal and string, some of them are nullable.

No exception is thrown. Any advices?

 
New Post 8/6/2011 5:02 AM
  palli
11838 posts
1st Level Poster




Re: DataGridView with DataTable. Columns properties can not be set 

Hi tejuguasu,

Welcome to Visual WebGui

I don't have Oracle to test, but using just normal ADO.NET DataTable and assigning it to the DataSource of my DataGridView, changing some of the Columns DisplayIndex and Visible properties works fine in my testing in the upcoming Visual WebGui Release d, as well as the released version 6.4.0 Release c.

I am therefore unable to reproduce this problem. If you still have the problem, please create the most minimal reproducing sample application, clean it, zip it and then email it to the support email address (see my signature) along with the full Http reference to this thread. Please also post here when you have sent it.

As for the sample code, plesae either base it on memory based ADO.NET, or use Northwind MSSQL sample database, so we will be able to test your application.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 8/10/2011 8:19 AM
  tejuguasu
4 posts
No Ranking


Re: DataGridView with DataTable. Columns properties can not be set 

Thank you Palli for the response.

 

I am still experiencing the problem. I am trying to clarify why this problem affects just for 2 tables. I'll post again wherever I find a solution or understand the issue better.

 
New Post 8/12/2011 4:02 AM
  palli
11838 posts
1st Level Poster




Re: DataGridView with DataTable. Columns properties can not be set 

Hi tejuguasu,

You are welcome

You do have some good hins as this is only happening to two tables. Some things that might be interesting to look for is if the AutoGenerateColumns property is true or false, and if it is false, you should view the designer generated code for the columns added to see if there could possibly be any duplicate column declarations in the code. We had some problems with earlier designers that under certain scenarios would create duplicates of the controls and add those duplicates to the form, leaving the original (and the one you are setting properties for) orphans.

Should this be the case, you would for example have DataGridView1 as the control you are using in your code, but looking at the designer generated code, you would have DataGridView1 created as an instance, but not added to the form, then you would have a new duplicate, DataGridView2, and that one would be added to the form's Controls collection. When you set some properties for DataGridView1, that would have no effect, as only DataGridView2 is actually on the runtime form.

This could be something to look for at least, although it may not explain or account for the problem.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 1/13/2012 8:36 AM
  tejuguasu
4 posts
No Ranking


Re: DataGridView with DataTable. Columns properties can not be set 
Modified By tejuguasu  on 1/13/2012 12:39:31 PM)

Solved: it is not a bug, just a matter of concurrence (I suppose).

The method to populate and configure the DataGridView was called from the class constructor and not from the OnLoad method. The DataSource stands but all the visual properties had no effect.

Thank you very much for your support.

 
Previous Previous
 
Next Next
  Forum  General Visual ...  Visual WebGui v...  [Solved] DataGridView with DataTable. Columns properties can not be set
Assessment Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS