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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG Hidden Rows Issue (v 2.1.0.9)

Thread ID:

Created:

Updated:

Platform:

Replies:

57905 Mar 13,2007 08:06 PM UTC Mar 14,2007 04:30 PM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 13, 2007 08:06 PM UTC

Hi,

I have some hidden rows in the GDBG. I'm binding the grid to a DataTable which i gets updated as i get data.

So lets say there are 5 rows (column [ID] 5,4,3,2,1) in the datatable and so in the grid. I hide the 1st (i.e. [ID]=5) row in the grid. After some time when i get data and the datatable is updated with 6th row ([ID]=6) and I bind it to grid then my the row containing [ID]=6 is hidden. How to solve this problem?

Thanks,
Amiya

Administrator [Syncfusion]
Replied On March 13, 2007 09:44 PM UTC

Hi Amiya,

This is by design. If you want to hide a row based on the cellvalue than you can handle the QueryRowHeight event and set the e.Size to "ZERO". Here is a code snippet to show this.

this.grid.Model.QueryRowHeight +=new GridRowColSizeEventHandler(Model_QueryRowHeight);

private void Model_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
{
GridModel model = sender as GridModel;
if( e.Index > 0 && e.Index < model.RowCount &&
model[e.Index,1].Text == "11")
{
e.Size = 0;
e.Handled = true;
}
}

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 13, 2007 11:20 PM UTC

Haneef,

Is there any event which is raised after grid is databound? I want to see the changes in the DataView ((DataTable)grid.DataSource).DefaultView which I can't see in the next line after binding the grid.

Thanks,
Amiya


Administrator [Syncfusion]
Replied On March 14, 2007 04:30 PM UTC

Hi Amiya,

To detect the dataSource change in the grid, you need to use the Binder.DataSourceChanged Event. Here is a code snippet.

this.grid.Binder.DataSourceChanged +=new EventHandler(Binder_DataSourceChanged);

private void Binder_DataSourceChanged(object sender, EventArgs e)
{
Console.WriteLine(" DataSource Changes");
}

If you want to detect the underlying list changes in a grid then use Binder.BindingListChanged event of the grid.

this.grid.Binder.BindingListChanged +=new ListChangedEventHandler(Binder_BindingListChanged);
private void Binder_BindingListChanged(object sender, ListChangedEventArgs e)
{
Console.WriteLine("ListChaned");
}

Best regards,
Haneef

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.

Warning Icon 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.Close Icon

;