We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

filter

Thread ID:

Created:

Updated:

Platform:

Replies:

44078 May 12,2006 08:14 AM May 27,2006 08:34 AM Windows Forms 18
loading
Tags: GridControl
Hrvoje Voda
Asked On May 12, 2006 08:14 AM

I''m searching a specific data in dataset. I get the result, but I don''t know how to clear loaded data from grid and put that new searched result data.

Administrator [Syncfusion]
Replied On May 12, 2006 08:38 AM

Hi Hrvoje , Please try this code to filter the records in a grid.Here is a code snippet. DataTable dt = this.gridDataBoundGrid1.DataSource as DataTable; dt.DefaultView.RowFilter = "[Column0] = ''" + this.textBox1.Text + "''"; //Column0 is a column Name this.gridDataBoundGrid1.Refresh(); //[optional] Here is a sample. http://www.syncfusion.com/Support/user/uploads/filter_3fe1fe40.zip Please let me know if this helps. Best Regards, Haneef

Hrvoje Voda
Replied On May 12, 2006 08:45 AM

The result that i have is in dataTable variable. DataTable resulTable; So, I just want to put that table result into grid.

Administrator [Syncfusion]
Replied On May 12, 2006 09:33 AM

Hi Hrvoje, Please try this code to reset the underlying datasource of the DataBoundGrid.Here is a code snippet. this.gridDataBoundGrid1.BeginUpdate(); this.gridDataBoundGrid1.Binder.SuspendBinding(); this.gridDataBoundGrid1.Binder.InternalColumns.Clear(); this.gridDataBoundGrid1.DataSource = ds.Tables[1]; this.gridDataBoundGrid1.Binder.ResumeBinding(); this.gridDataBoundGrid1.EndUpdate(true); this.gridDataBoundGrid1.Refresh(); Here is a sample. http://www.syncfusion.com/Support/user/uploads/filter_dbd706ca.zip Please let me know if you need any further assistance. Best Regards, Haneef

Hrvoje Voda
Replied On May 12, 2006 10:03 AM

Now i get the result in grid, but when i click on the result nothing happend. I have a cellDoubleClick event on the grid. It doesn''t work. Why?

Administrator [Syncfusion]
Replied On May 12, 2006 12:10 PM

Hi Hrvoje, Kindly refer to this forum thread [ http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=42430 ] for more details on this issue. And let us know if it helps to resolve the issue. Best regards, Madhan

Administrator [Syncfusion]
Replied On May 12, 2006 06:18 PM

I don''t know what to write after: gridPregled.Grid.CurrentCellControlDoubleClick += what comes here? (gridPregled_CellControlDoubleClick);

Administrator [Syncfusion]
Replied On May 13, 2006 01:14 AM

Hi Hrvoje, Try this code gridPregled.Grid.CurrentCellControlDoubleClick += new System.Windows.Forms.ControlEventHandler(gridPregled_CellControlDoubleClick); private void gridPregled_CellControlDoubleClick(object sender, System.Windows.Forms.ControlEventArgs e) { MessageBox.Show("Control Double Click Event"); } Let me know if this helps. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 14, 2006 06:16 AM

It doesn''t help. a click event is not raised.

Administrator [Syncfusion]
Replied On May 15, 2006 12:36 AM

Hi Hrvoje , I have tested this issue by creating a sample in v.4.1.0.50 and then again tested by upgrading to 4.1.0.64. I was not able to reproduce the issue.Maybe I am not following the steps that you are doing. Attached sample working fine here.If you can provide more information, we can try to suggest some solution. Here is a sample. http://www.syncfusion.com/Support/user/uploads/filter_42585336.zip Could you please run this at your end and let me know how it goes? Thanks for choosing Syncfusion Product. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 15, 2006 04:19 AM

Maybe the problem is that I''m using a usercontrol as a grid. So, when i call the raise event I have to put: grid.Grid.CurrentCellControlDoubleClick...

Administrator [Syncfusion]
Replied On May 15, 2006 04:58 AM

Hi Hrvoje, Sorry for the inconvenience caused. I have created a sample as per your specification.The sample illustrates the possiblity to catch dobule click event in a cell. Please refer to the attached sample and let us know if you are trying something different. Here is a modified sample. http://www.syncfusion.com/Support/user/uploads/filter_65e78b17.zip Thanks for your interest in Syncfusion products. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 15, 2006 06:03 AM

I''m doing exacly the same thing, but it doesn''t work. I don''t understand.

Administrator [Syncfusion]
Replied On May 15, 2006 07:19 AM

Hi Hrvoje, To track down what is causing this problem, you could try commenting out all this code, and then just register a CurrentCellcontorlDoubleClick event in a grid adding only the minimal code shown in the sample that works. If this simple code works, you could start adding other pieces of the original code until this breaks. Maybe this would point to what is failing. If you can send us a sample that does not work, we can try to debug it here. Thanks for your co-operation. Regards, Haneef

Administrator [Syncfusion]
Replied On May 15, 2006 09:58 AM

I put everything into new project, but it still doesn''t work. The only thing that work, but ofcourse before I call the search method is: gridPregled.Grid.CellDoubleClick += new GridCellClickEventHandler (gridPregled_CurrentCellControlDoubleClick); void gridPregled_CurrentCellControlDoubleClick(object sender, EventArgs e) { MessageBox.Show("Klik!"); } ) Maybe it''s a bug in a new version. I''m using Syncfusion version 4.102.0.62.

Administrator [Syncfusion]
Replied On May 16, 2006 07:43 AM

Hi Hrvoje, Somebody needs to debug your code to see why the event is not working. If you can send us a sample, we can try to debug it. You may want to do this through Direct Trac. Otherwise, you will have to debug it yourself. Some things to check: 1) Any excpetions being thrown. 2) Is the grid or control have any Enabled properties set to false? Also, we might suggest you comment out any other event handlers in his code, and also comment other grid property settings to see if any of these are interfering with this. Best Regards, Haneef

Administrator [Syncfusion]
Replied On May 16, 2006 07:56 AM

Hi Hrvoje, One more suggestion: Do you have ListBoxSelectionMode set? If so, you may try turning this property off. Please let me know if this helps. Best Regards, Haneef

Hrvoje Voda
Replied On May 26, 2006 01:09 PM

I tried everything. Nothing helps.

Administrator [Syncfusion]
Replied On May 27, 2006 08:34 AM

You said you put everything in a new project in one of your previous posts above, and that it still does not work. Can you post that project that does not work here, or submit a direct trac incident with that project so we can debug it and see what is failing?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;