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.

Custom Filter Action in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

15164 Jun 13,2004 10:00 AM Jun 18,2004 03:32 PM Windows Forms 7
loading
Tags: GridControl
Umesh Kumar
Asked On June 13, 2004 10:00 AM

Hi, After filtering with custom option, on which row and column(or on which cell) the focus will be focussed. How to avoid the click events on the filter combo box. How to restrict the filter combo box to filtering only. As I seen, after filtering if I click the check box which is a immediate row of the filter, the filter custom filter is popping up every time I click the check box. How to avoid such a unwanted event. Thanks in advance, logicengineer.

Administrator [Syncfusion]
Replied On June 13, 2004 01:30 PM

>After filtering with custom option, on which row and column(or on which cell) the focus will be focussed. > The grid''s current cell is left on the filter combobox cell. The position of the currencymanager is left where it was. You can set these items yourself by handling the CurrentCellComfirmedChanges event.
private void gridDataBoundGrid1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	if(cc.RowIndex == 1)
	{
		cc.MoveTo(this.gridDataBoundGrid1.Model.Rows.FrozenCount + 1, cc.ColIndex);
		this.gridDataBoundGrid1.Binder.CurrentPosition = 0;
	}
}
>How to avoid the click events on the filter combo box. > You can set the cell''s style.Enabled = false. this.gridDataBoundGrid1[1,1].Enabled = false; this.gridDataBoundGrid1.CurrentCell.ResetCurrentCellWithoutDeactivate(); //in case 1,1 is the currentcell >How to restrict the filter combo box to filtering only. > I am not sure what you mean by this question. How can I see the behavior you want to avoid in the FilterBar sample we ship. >As I seen, after filtering if I click the check box which is a immediate row of the filter, the filter custom filter is popping up every time I click the check box. > >How to avoid such a unwanted event. > So, you have added a checkbox to a cell in the filterbar row? Are you handling GridFilterBarCreatingColumnHeader, and returning e.Cancel = true to tell the grid not to put a FilterBar cell on this column? If that does not solve the problem, can you post a sample showing the problem so we can look at it here.

Umesh Kumar
Replied On June 16, 2004 06:56 AM

Hi Clay Burch, It worked very well. Thanks alot for the code snippet. How to avoid the double click event(without losing the sorting property of the column) on the column headers for the columns defined in the grid. Thanks & Regards, logicengineer. >>After filtering with custom option, on which row and column(or on which cell) the focus will be focussed. >> >The grid''s current cell is left on the filter combobox cell. The position of the currencymanager is left where it was. You can set these items yourself by handling the CurrentCellComfirmedChanges event. >
>private void gridDataBoundGrid1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
>{
>	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
>	if(cc.RowIndex == 1)
>	{
>		cc.MoveTo(this.gridDataBoundGrid1.Model.Rows.FrozenCount + 1, cc.ColIndex);
>		this.gridDataBoundGrid1.Binder.CurrentPosition = 0;
>	}
>}
>
> >>How to avoid the click events on the filter combo box. >> > >You can set the cell''s style.Enabled = false. > >this.gridDataBoundGrid1[1,1].Enabled = false; >this.gridDataBoundGrid1.CurrentCell.ResetCurrentCellWithoutDeactivate(); //in case 1,1 is the currentcell > > >>How to restrict the filter combo box to filtering only. >> > >I am not sure what you mean by this question. How can I see the behavior you want to avoid in the FilterBar sample we ship. > > >>As I seen, after filtering if I click the check box which is a immediate row of the filter, the filter custom filter is popping up every time I click the check box. >> >>How to avoid such a unwanted event. >> >So, you have added a checkbox to a cell in the filterbar row? Are you handling GridFilterBarCreatingColumnHeader, and returning e.Cancel = true to tell the grid not to put a FilterBar cell on this column? > >If that does not solve the problem, can you post a sample showing the problem so we can look at it here.

Administrator [Syncfusion]
Replied On June 16, 2004 07:15 AM

I may not understand your question. In 2.0, CellDoubleClick is a canceable event by setting e.Cancel = true. Is this the event you want to avoid? If not, then you will have to derived the grid, and override OnDoubleClick and not call the baseclass if you want to avoid the grid''s DoubleClick event.

Umesh Kumar
Replied On June 16, 2004 12:22 PM

Hi, Let me give you a detailed scenerio: 1. If the user double clicks any of the GDBG row, then a new form pops up, to edit the contents of the present double clicked row. 2. If the user double clicks the column header then this new form should not pop-up and only sorting of the column should happen. 3. But in the present case if i tried to double click the header columns, this new form is poping up. 4. Here the double click is handled through cell double click event. 5. On double click event,it is observed that the row index showed as 2(which is read through a message box)instead of 0. I unable to understand the reason behind. 6. The problem is, double click on any of the header columns this new form should not pop-up, it should be restricted to the sorting action only. 7. what is override OnDoubleclick? Is it possible for you to explain the override OnDoubleClick with a sample code. 8. where one can get the details of all the events and methods associated with the GDBG and other syncfusion tools. pls. reply as soon as possible. Thanks & Regards, logicengineer >I may not understand your question. > >In 2.0, CellDoubleClick is a canceable event by setting e.Cancel = true. Is this the event you want to avoid? > >If not, then you will have to derived the grid, and override OnDoubleClick and not call the baseclass if you want to avoid the grid''s DoubleClick event.

Administrator [Syncfusion]
Replied On June 16, 2004 12:35 PM

You must have code in the CellDoubleClick event that pops up this form, right? So, you can check e.RowIndex <= this.grid.Model.Rows.HeaderCount to decide whether to display your form. Will this work for you?

Umesh Kumar
Replied On June 18, 2004 01:42 PM

Hi Clay Burch, Thanks for the response. This is not helping me to sort out the problem. Is there any way to implement. the requirement is whenever the user double clicks any of the column headers,the action should be restricted to sorting only even though some other actions are associated with the double click event. Thanks & Regards, logicengineer. >You must have code in the CellDoubleClick event that pops up this form, right? > >So, you can check e.RowIndex <= this.grid.Model.Rows.HeaderCount to decide whether to display your form. > >Will this work for you?

Administrator [Syncfusion]
Replied On June 18, 2004 03:32 PM

Can you attach a sample showing the problem? Normally, the only time you get a sort is if you double click a header (other than on a border). So, I am not sure why you cannot test the e.ColIndex of the CellDoubleClick event to cancel it when e.RowIndex is not a header. If you can provide a sample project showing what the problem is, then maybe we can suggest a solution.

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.

;