Forum  General Visual ...  Announce It! ( ...  New control VirtualDataGridView
Previous Previous
 
Next Next
New Post 3/26/2011 7:22 AM
Unresolved
  pgokke
4 posts
No Ranking


New control VirtualDataGridView 
Modified By pgokke  on 3/27/2011 5:34:57 AM)

Hi,

I use the datagridview in the web application of our company's product. I don't want to use internal paging. I present 10 visible rows and scroll through the complete grid by using a vertical scrollbar. I always used the DataSource property binding a DataTable which is filled through a stored procedure of our SQL server database. I used visual web gui 6.4 beta until now.

I am facing a huge problem. When the grid has more then 600 records it gets extremely slow in doing it's presentation.

Then I read about performance in contrast to using the data grid view and noticed that i should seek the solution in using virtual mode and a just in time mechanism of getting the appropiate data. First I implemented a solution using the datagridview and VWG 6.4 beta.

I used the CellValueNeeded event and had the VirtualMode property set to true. The result was the same as before and was very very slow.

Then I realized there is a new version of Visual Web Gui 6.4 release b. The release notes of this version describe a solution to my problem. A new control was added called VirtualDataGridView.

I installed the new version of VWG and tried the new VirtualDataGridView control. The problem I have is that I don't seem to be able to display any data using this control. I can't find any examples of this control in the CompanianKit or the forums.

Can someone please help me with this one?

 
New Post 3/28/2011 3:36 PM
  palli
14304 posts
1st Level Poster




Re: New control VirtualDataGridView 

Hi pgokke,

The Virtual DataGridView is (almost) identical to use as the standard DataGridView, except for the fact that you will need to register it in web.config in the controls section to be able to use it, and then to fully use it's potential, you set UseInternalPaging = False.

The following code works fine, after you have dropped a VirtualDataGridView on a form and registered it in web.config:

 

        private void Form2_Load(object sender, EventArgs e)
        {
            virtualDataGridView1.UseInternalPaging = false; 
            virtualDataGridView1.DataSource = Utils.BuildDatatable(3, 100000);
        }

Where the BuildTable is declared with this code:

 

        public static DataTable BuildDatatable(int intCols, int intRows)
        {
            DataTable DT = new DataTable();
            for (int i = 1; i <= intCols; i++)
            {
                DT.Columns.Add("Col" + i.ToString());
            }
            for (int i = 1; i <= intRows; i++)
            {
                DataRow DR = DT.NewRow();
                for (int j = 1; j <= intCols; j++)
                {
                    DR["Col" + j.ToString()] = j.ToString();
                }
                DT.Rows.Add(DR);
            }
            return DT;
        }

This sample populates the VirtualDataGridView with 100 thoushand rows in a DataTable, and the longest delay you get is while creating the rows. After the rows have been created, you have a very powerful and well performing grid with 100 thousand rows in single page as it seems.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 4/5/2011 10:20 AM
  garsio
17 posts
No Ranking


Re: New control VirtualDataGridView 

Hi Palli,

I'm using the new virtualDataGridView and it works fine for me.

I'm trying to implement a search textbox and button. The click button searches the text you have entered in the textbox by doing a loop over the rows and cells of the virtualDataGridView until it finds the seached text.

My question is what is the best way to set the cell/row finded selected and visible
 

Thanks in advance

Toni

 
New Post 4/9/2011 6:48 PM
  palli
14304 posts
1st Level Poster




Re: New control VirtualDataGridView 

Hi Toni,

Setting the DataGridView.CurrentCell is the most widely used method I believe.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 4/11/2011 6:20 AM
  Anubis1212
17 posts
No Ranking


Re: New control VirtualDataGridView 

Hi.

I installed the VWG version 6.4.0_Release_b_NET3.5 VS2008. Dropped a VirtualDataGridView on a form and registered it in web.config via project properties window.

  <Controls>
   <Control Type="Gizmox.WebGUI.Forms.VirtualDataGridView, Gizmox.WebGUI.Forms, Version=3.0.5701.0, Culture=neutral, PublicKeyToken=c508b41386c60f1d" />
  </Controls>
 

VirtualDataGridView  don't show any data.
What is wrong ?

 
Previous Previous
 
Next Next
  Forum  General Visual ...  Announce It! ( ...  New control VirtualDataGridView
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS