Dropdown grid and modal dialog
Hi,
how can I display a modal dialog when I press a button in a dropdown grid? I attached a sample base on the AdvancedTabbedMDI_Sample. Please drop down the cell A2. In this dropdown grid press the button in cell A1. A modal dialog is shown where I want to select a value for cell A1. When I activate this dialog the dropdown cell is closed. I tried different controls as parameter for ShowDialog() but I had no success. I tried to set the dialog as topmost but no success, too. When I do not set the dialog as topmost it is drawn behind the dropdown grid.
Any Ideas?
Regards,
Christian
how can I display a modal dialog when I press a button in a dropdown grid? I attached a sample base on the AdvancedTabbedMDI_Sample. Please drop down the cell A2. In this dropdown grid press the button in cell A1. A modal dialog is shown where I want to select a value for cell A1. When I activate this dialog the dropdown cell is closed. I tried different controls as parameter for ShowDialog() but I had no success. I tried to set the dialog as topmost but no success, too. When I do not set the dialog as topmost it is drawn behind the dropdown grid.
Any Ideas?
Regards,
Christian
DropDownGrid21.zip
SIGN IN To post a reply.
7 Replies
AD
Administrator
Syncfusion Team
August 21, 2006 07:36 AM UTC
Hi Christian,
Try the code below in the CurrentCellCloseDropDown event handler.
private void gridControl1_CurrentCellShowedDropDown(object sender, System.EventArgs e)
{
if (e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Deactivated)
{
this.gridControl1.CurrentCell.ShowDropDown();
}
}
Here is the modified sample
http://www.syncfusion.com/Support/user/uploads/DropDownGrid3_cd0498a4.zip
Let me know if this helps.
Thanks,
Rajagopal
Try the code below in the CurrentCellCloseDropDown event handler.
private void gridControl1_CurrentCellShowedDropDown(object sender, System.EventArgs e)
{
if (e.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Deactivated)
{
this.gridControl1.CurrentCell.ShowDropDown();
}
}
Here is the modified sample
http://www.syncfusion.com/Support/user/uploads/DropDownGrid3_cd0498a4.zip
Let me know if this helps.
Thanks,
Rajagopal
CL
Christian Lützenkirchen
August 21, 2006 05:51 PM UTC
Hi Rajagopal,
thank you for your sample but it does not work properly. It has the following problems:
* When you click in the middle or the modal dialog the dropdown grid is drawn in front of the dialog
* The the modal dialog should not be topmost, only modal to the application. The dropdown grid seems to bee topmost, too. If you move another application over the grid it is drawn behind the two windows.
Do you have any other ideas?
Regards,
Christian
thank you for your sample but it does not work properly. It has the following problems:
* When you click in the middle or the modal dialog the dropdown grid is drawn in front of the dialog
* The the modal dialog should not be topmost, only modal to the application. The dropdown grid seems to bee topmost, too. If you move another application over the grid it is drawn behind the two windows.
Do you have any other ideas?
Regards,
Christian
AD
Administrator
Syncfusion Team
August 23, 2006 09:26 AM UTC
Hi Christian,
Issue 1:
Do you want to show the form without losing the grid focus? If so, Please refer to the browser sample \In depth\DropDownFormAndUserControlSample shows how you can popup a Form from a grid cell.
Here is a modified sample for implementing it.
http://www.syncfusion.com/Support/user/uploads/DropDownGridModified_8014af69.zip
Issue 2:
Try setting the TopMost property of the ModalDialog form to false in ModalDialog''s load event. Below code snippet.
void ModalDialog_Load(object sender, EventArgs e)
{
this.TopMost = false;
}
Also refer the below forum thread for customize the DropDown cell.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=48072
Let me know if this helps.
Best Regards,
Haneef
Issue 1:
Do you want to show the form without losing the grid focus? If so, Please refer to the browser sample \In depth\DropDownFormAndUserControlSample shows how you can popup a Form from a grid cell.
Here is a modified sample for implementing it.
http://www.syncfusion.com/Support/user/uploads/DropDownGridModified_8014af69.zip
Issue 2:
Try setting the TopMost property of the ModalDialog form to false in ModalDialog''s load event. Below code snippet.
void ModalDialog_Load(object sender, EventArgs e)
{
this.TopMost = false;
}
Also refer the below forum thread for customize the DropDown cell.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=48072
Let me know if this helps.
Best Regards,
Haneef
CL
Christian Lützenkirchen
August 24, 2006 08:22 AM UTC
Hi Haneef,
thank you for your sample. It works better but there are still two issues.
* Can I prevent the dropdown grid from flashing each time I click on the modal dialog? The modal dialog is flashing too when I click on the dropdown grid. Is it possible to stop this flashing, too? The Problem is gridControl1_CurrentCellCloseDropDown. There is no Cancel member in PopupClosedEventArgs. Is there any other way to forbid closing earlier?
* The dropdown grid ist always topmost, so the modal dialog is always topmost even if the topmost-flag is set to false. If I move another window over the application it is drawn between the main grid and the dropdown grid...
Regards,
Christian
thank you for your sample. It works better but there are still two issues.
* Can I prevent the dropdown grid from flashing each time I click on the modal dialog? The modal dialog is flashing too when I click on the dropdown grid. Is it possible to stop this flashing, too? The Problem is gridControl1_CurrentCellCloseDropDown. There is no Cancel member in PopupClosedEventArgs. Is there any other way to forbid closing earlier?
* The dropdown grid ist always topmost, so the modal dialog is always topmost even if the topmost-flag is set to false. If I move another window over the application it is drawn between the main grid and the dropdown grid...
Regards,
Christian
CL
Christian Lützenkirchen
August 31, 2006 06:12 AM UTC
Hi Haneef,
any ideas?
Regards,
Christian
any ideas?
Regards,
Christian
CL
Christian Lützenkirchen
November 7, 2006 01:10 PM UTC
Hi Haneef,
I did not find any solution mean while. Do you have any ideas?
Regards,
Christian
I did not find any solution mean while. Do you have any ideas?
Regards,
Christian
AD
Administrator
Syncfusion Team
November 8, 2006 09:26 AM UTC
Hi Christian,
You can avoid this by handling the PopupContainer.BeforeCloseUp event by registering it in the OnShowDropDown override. Please have a look at the modified sample for more details.
//Some code snippet...
//the dialog forms flickering is the default behavior.
protected override void OnShowDropDown()
{
base.OnShowDropDown();
this.PopupControlContainer.BeforeCloseUp += new CancelEventHandler(PopupControlContainer_BeforeCloseUp);
}
Here is a sample.
http://www.syncfusion.com/Support/user/uploads/DropDownGridModified_38d11253.zip
Best Regards,
Haneef
You can avoid this by handling the PopupContainer.BeforeCloseUp event by registering it in the OnShowDropDown override. Please have a look at the modified sample for more details.
//Some code snippet...
//the dialog forms flickering is the default behavior.
protected override void OnShowDropDown()
{
base.OnShowDropDown();
this.PopupControlContainer.BeforeCloseUp += new CancelEventHandler(PopupControlContainer_BeforeCloseUp);
}
Here is a sample.
http://www.syncfusion.com/Support/user/uploads/DropDownGridModified_38d11253.zip
Best Regards,
Haneef
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
CL Christian Lützenkirchen
- Aug 20, 2006 06:20 AM UTC
- Nov 8, 2006 09:26 AM UTC