Hello,
I have an ultraGrid which has some drop downs on a couple of its columns. The problem I am facing is that I am not able to choose from the dropdown if I reduce / minimize the size of the form which holds the grid from its original size. It worked fine until I added the following piece of code
private void OrderRepositoryDetailsView_SizeChanged(object sender, EventArgs e) { dgItems.SetBounds(0, 0, this.ClientSize.Width, this.ClientSize.Height); this.AdjustFormScrollbars(false); }
I also noticed that when I click on any of the dropdowns in the some of the columns on a row , this event seems to be getting fired, although I can see the drop down I am not able to select a value from the drop down.
Not sure what is happening, any help will be greatly appreciated
Thanks,AJ
Hello AJ,
I`m not sure that I understand your scenario and final goals. Could you please give us more details about:
1. Are you using ValueList into your dropdown columns or EditorComponent ?
2. Which SizeChanged event do you handle into your application. The UltraGrid`s SizeChanged event or WinForm`s SizeChanged event
3. What is dgItems and what do you want to acheive using this method. Why you set the location to 0,0
Could you please send us more details about your scenario and if you have small sample that reproduce your issue, I`ll be glad to research it for you. I try to reproduce your scenario in a small sample, but everything works properly. Please take a look at the attached video and let me know if you think that I misunderstand your scenario or questions
Regards
Hello Georgi,
Thanks for the quick response. I am sorry for not being more clear. Let me answer your questions accordingly.
1) Are you using ValueList into your dropdown columns or EditorComponent ?
Currently there are 4 dropdowns on the grid. And I am using them as a Value List as shown below in the dgItems_InitializeLayout method of the grid (dgItems)
e.Layout.Bands[0].Columns["StoreKey"].ValueList = cmbStore; e.Layout.Bands[0].Columns["RequestTypeName"].ValueList = cmbRequestTypes; e.Layout.Bands[0].Columns["ChangeReason"].ValueList = cmbChangeReason; e.Layout.Bands[0].Columns["StatusInString"].ValueList = cmbStatuses;
2) Which SizeChanged event do you handle into your application. The UltraGrid`s SizeChanged event or WinForm`s SizeChanged event
OrderRepositoryDetailsView, I can say is the WinForm (Its actually dervied from System.Windows.Forms.UserControl, we are using CAB architecture)
As you can see in the above method, if the form size changes, the code in the size changed event changes the size of the grid to match the size of the form and disables the scroll bar.
The above method was implemented because there were two horizontal scroll bars showing up, when the Form was resized. So when the form is resized, the above event fires and disables the scroll bar of the Form.
dgItems is the UltraGrid, the Grid has to occupy the whole form and hence we are setting the location to 0,0 and height and width of the datagrid to the Forms height and width.
Please let me know if you have any other questions that i can answer.
Thanks for your time and help sofar.
AJ
Thanks for the reply. I relaised it that since we are using CAB architecture, its a CAB architecture issue. I tired your sample project with some changes and it works fine.
So I guess you can go ahead and close this issue.
Thanks,
Ashwin
here is the sample:
Thanks for provided information. I try to reproduce your scenario and issue in a small sample, but without success. I`m using our latest available version 12.1.20121.2054. Please take a look at the attached sample and video file and let me know if you think that I didn`t reproduce your scenario. Please feel free to modify this sample to reproduce your issue and revert it back to me. I`ll be glad to research it for you.
Let me know if you have any questions.