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

To make rows invisible in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

76225 Aug 27,2008 03:51 PM UTC Sep 2,2008 04:13 AM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 27, 2008 03:51 PM UTC

Hi,

I have a scenario where I have to bind grid based on 3 radio buttons - on click of first radion button, I bind the whole datatable to the grid.
On click of other 2 radion buttons, i filter the dataset and bind the set of datarows to grid.

I have editable columns in the grid, on selecting a value from the dropdown column, i have to populate another column in the grid for which i use this event - TableControlCurrentCellCloseDropDown.

In this event, i get selected record :
DataRowView gridDataRowView = gridRecord.GetData() as DataRowView;

gridDataRowView has correct values in case of clicking 1st radion button where i am binding the whole datatable.
However gridDataRowView does not have any value in case of the other 2 radion buttons as I am binding the DAtaRows in this case.

On click of other 2 radion buttons i have to hide certain rows, so I am doing Select on dataset and binding the resulting datarows.

How do I handle this situation where I have to hide certain rows on grid. I have attached the screen shot along with this message.

Thanks,
Deepa



Images_627f47d6.zip

SubhaSheela R [Syncfusion]
Replied On August 28, 2008 12:41 PM UTC


Hi Deepa,

Thank you for posting query to us and the details.

Instead of doing a select on your dataset and binding the resulting datarows you may bind the whole datatable and hide the rows/records you dont want based on some condition.

By default, the GridGroupingControl does not support rows with individualized rowheights. To get this support, you need to add a custom GridEngine as in the Syncfusion Browser sample ResizableRows.

\\Syncfusion\EssentialStudio\6.2.0.40\Windows\Grid.Grouping.Windows\Samples\2.0\FeaturedSamples\ResizableRows

After having this you can hide rows in grid. For your case the best way to do this would be to have an extra column in your DataTable say ‘HideStatus’(hide this column) to keep track of the hidden rows. You can initially set the value to be false and apply filter from Grid to show the records that satisfy the false criteria.

So whenever you need to hide a row, you just need to set the bool value of that Row field to true.

Please refer this sample for the implementation.

http://www.syncfusion.com/Support/user/uploads/GGCHide_4c50dba8.zip

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Regards,
Subhasheela R


Administrator [Syncfusion]
Replied On September 1, 2008 10:20 AM UTC

Hi,

I trid Addding Record filters as suggested.

grid.TableDescriptor.RecordFilters.Add(new RecordFilterDescriptor "isVisibleRow", "[isVisibleRow] like 'true'"));

This works. Now I can bind the datatable and yet filter the rows based on the conditions.

Many Thanks,
Deepa

>
Hi Deepa,

Thank you for posting query to us and the details.

Instead of doing a select on your dataset and binding the resulting datarows you may bind the whole datatable and hide the rows/records you dont want based on some condition.

By default, the GridGroupingControl does not support rows with individualized rowheights. To get this support, you need to add a custom GridEngine as in the Syncfusion Browser sample ResizableRows.

\\Syncfusion\EssentialStudio\6.2.0.40\Windows\Grid.Grouping.Windows\Samples\2.0\FeaturedSamples\ResizableRows

After having this you can hide rows in grid. For your case the best way to do this would be to have an extra column in your DataTable say ‘HideStatus’(hide this column) to keep track of the hidden rows. You can initially set the value to be false and apply filter from Grid to show the records that satisfy the false criteria.

So whenever you need to hide a row, you just need to set the bool value of that Row field to true.

Please refer this sample for the implementation.

http://www.syncfusion.com/Support/user/uploads/GGCHide_4c50dba8.zip

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Regards,
Subhasheela R




SubhaSheela R [Syncfusion]
Replied On September 2, 2008 04:13 AM UTC

Hi Deepa,

Thanks for your update.

Please feel free to open an new one if you have any further technical queries.

Thanks for using Syncfusion products.

Regards,
Subhasheela R


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

;