Current filter:
                                You should refresh the page.
                                We apologize for the inconvenience. Our ordering system and the support center may be offline for a few hours on Sunday, May 19 due to maintenance tasks.
                                0
                                  • Hello,


                                    we develop a management software in which I want to use the ServerModeView to present the saved records.
                                    The editing of the record should not be within the grid but in separate edit fields.


                                    So my first question is: How do I make the ServerModeView not editable (readonly)?

                                    I havn't found any property like AllowEdit or else.


                                    The next question is about the record selection.

                                    Up to now I used the Dataset to identify the actual record and FieldByName to get the specific field value.

                                    Is there anything related in the ServerModeView class?


                                    I use "DataController.GetItemByFieldName(FieldName).EditValue" so far. Is there anything more elegant?



                                    Regards

                                    Dirk Köhler







                                • Franky Brandt 08.04.2012

                                  I had to look for both of those as well.
                                  The Serverview is readonly but if like me you want the columns not to be editable set options.editing on false for each column.
                                  I found no editing property on view level.

                                  About getting the id i used something like:
                                  ID := <View>.DataController.Values[<View>.DataController.FocusedRowIndex,<columnwithidfield>.Index];

                                  Example:
                                      ID := cxGrid1ServerModeTableView1.DataController.Values[cxGrid1ServerModeTableView1.DataController.FocusedRowIndex,
                                          cxGrid1ServerModeTableView1SA_ID.Index];

                                • Dirk Köhler 08.04.2012

                                  Thank you very much.

                                  Is there any disadvantage in using my method to get the FieldValue compared to yours?

                                • Both these approaches are correct, and I see no problems with using them.

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.