Hello support team,
attached theres a small sample application that demonstrate my problem.
I am creating an imagecombobox with images in the 'detailexpanding' event. In the same event i would like to fill in a value.
But it throws an exception:
EcxInvalidDataControllerOperation: 'ItemIndex out of range'
This appears in line 81.
But when i comment out line 81 and comment in the Button1Click event, run the programm, expand the detail view and click on "Manual Fill" it works.
So what can i do to create and fill an imagecombobox in a detailview in the expanding event?
Looking forward to your reply,
Stefan Henkenjohann
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Stefan,
Thank you for the sample project.
Actually, DetailView references the pattern view, whereas you should create a column in the currently active clone view to achieve what you want. Please modify the code as follows:
procedure TForm1.MasterViewDataControllerDetailExpanding(
ADataController: TcxCustomDataController; ARecordIndex: Integer;
var AAllow: Boolean);
const lcImageCount = 3;
var
…
ADetailView: TcxGridTableView;
begin
…
ADetailView := TcxGridDataController(lDetailDC).GridView as TcxGridTableView;
lColumn := ADetailView.CreateColumn;
…
end;
After that, everything should work as expected. Please try this solution and let us know how it works for you.
Thanks,
Vito
Thanks Vito this works perfect.
In the sample application it works and in my main application too, but there are two more things:
In my main application i do the same things as in this sample application (creating and filling columns).
1.
When i open a detailview at runtime at the first time no columns that i has created at runtime are visible. When it opens a second time alle columns that i has created at runtime are visible. I cant give you an example because the main application is too big.
Are there any ideas about this problem?
2.
I am also checking the column name before creating it. But i get an error message that the columns name exists. I have checked the column name in the ADetailView (clone) and in the pattern view. But the column is nowhere. How can i check the column name correctly to search in all detail clones etc.?
Thank you very much.
Hi Stefan,
The problems you described seem to be specific to your application, and I'm afraid we can't give you any advice until we see them in action. Please post here a small sample project illustrating these issues, so that we can examine it. We'll do our best to help you address these problems as soon as we replicate them locally.
Thanks,
Vito
First… problem 1 is fixed… (little mistake myself).
Ok… attached theres a small sample application that demonstrate my second problem.
There are three levels:
Master
Detail
Detail2
So please expand all more than one time. Thank click on different column headers in the views. Some column headers have a Column.Name and some not. And this is my problem. The columns without name are created in an expand event from an other view clone. but they need also the same Column.Name because i would like to act with them.
Background information:
Everytime the user expand a detail clone i am creating dynamicly columns (if they exist i dont want to create them) after that i fill them etc. but in the other clones theres no Column.Name
Hope thats clear…
Thank you very much :)
Stefan
Hi Stefan,
Thank you for the sample, and for the detailed description of the problem.
This is how ExpressQuantumGrid is designed: the column's Name property value isn't assigned when creating a clone view, because there can't be several components with the same name on a single form. As a solution, please operate with the column's Tag property instead.
Attached is a modified sample project illustrating this approach. Please try it and let us know your results.
Thanks,
Vito
Hi Vito,
Hi Vito, your new website design contains a little error in firefox… no enter in this textfield is allowed! But back to topic, thanks for the sample, now it works perfect, great support! Regards Stefan Henkenjohann
Hi Stefan,
I'm glad to hear that it helps you. Thank you for informing us.
>>>>
your new website design contains a little error in firefox… no enter in this textfield is allowed!
<<<<
Thank you for the report. However, we need additional information on this problem. Could you please provide us with step-by-step instructions on how to replicate it, and specify exactly which browser version you're using? BTW, the Support Center concept does not allow multiple problems within a thread, as this makes it difficult to properly track such items. So, could you please post additional information in a separate bug report?
Thanks,
Vito
Sorry that i am using this post anymore.
The bug is not reproducible maybe thats a unique problem from yesterday.
When i can reproduce this error i will post a bug report.
But now everything works fine, as usal!
Regards,
Stefan
Done