Home - Forums-.NET - FlyGrid.Net (Windows Forms) - flygrid data mapping issue (Urgent)

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

flygrid data mapping issue (Urgent)
Link Posted: 11-Oct-2009 18:44
       I am working in Flygrid.On a virtual mode. I have stuck in a problem and tried almost everything but did not find any solution .
In my application I have a windows form called “product detail” having fly grid on it. Now I can open max 100 instance of that form from my MDI.

If (Counter > 100)
Product ObjProduct = new Product ();
ObjProduct.MdiParent = this;
ObjProduct.Location = new System.Drawing.Point(0, 0);

In that form I have a textbox. Where user can enter product code to see it product detail. So in different instance user can enter different product code.
I have take a dictionary whose key/Value key is the product code and value is the form instance.
On keypress event I have done following

StdFormPrdObj[key].flyGrid1.VirtualMode_GetCount+= new GetCountHandler(flyGrid1_VirtualMode_GetCount);

StdFormPrdObj[key].flyGrid1.VirtualMode_GetNodeCellValue += new GetCellValueHandler(flyGrid1_VirtualMode_GetNodeCellValue);

StdFormPrdObj[key].flyGrid1.VirtualMode_InitNewNode += new InitNewNodeHandler(flyGrid1_VirtualMode_InitNewNode);

StdFormPrdObj[key].flyGrid1.Rows.VirtualMode = true;

Now when I run the application only current form instance GetNodeCellValue is called on other.

For example I have open three instance have different product code on to it I want all the “GetNodeCellValue” should be called . in my case last window form oly run that why other form value change it too with new form values.

How can I do this. Please help  me, I have tried every thing

Link Posted: 14-Oct-2009 03:09
1. Please don't forget to add at least one column to your grid.
2. When you connected to the virtual mode events, add columns, please call FlyGrid.Rows.RefreshNodes() method.
3. And - don't forget to embrace your initialization code in FlyGrid.BeginInit / FlyGrid.EndInit pair, like following:

pirvate void InitGrid(FlyGrid flyGrid)
    //connect to virtual mode events...
    //add columns...
  FlyGrid.Rows.RefreshNodes();//start virtual mode

For details, how to work in virtual mode (switch to real mode) you can see in the FlyGrid Demo code, virtualGridForm.cs , virtualNestedGridForm.cs files.