Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I have a data bound grid column that is bound to a numeric field with integer values 0-7. Each of these values corresponds to a certain string value. For example 0= Regular, 1=Advanced, etc.

                                    I am not displaying this column, but I want to group by this column. When grouping by this column, the numeric value from the database is displayed in the group caption. I need t display the string representation of the value, not the value itself.

                                    I have moved to DevExpress from Janus Grid, where this was an easy thing to achieve.

                                    How do I do this with the DevEx grid?

                                    Thanks,
                                    Josh

                                0

                                Hello Josh,

                                One of the methods to do this is to assign a specific editor that will represent this column using specific display values. Assign a RepositoryItemImageComboBoxEdit object to the column's ColumnEdit property and initialize the object's Items collection as required. Please refer to the "Inplace Editors" help topic to learn more about assigning in-place editors.

                                Thank you, Alex.

                                0

                                Hi Alex,

                                I have already used a comboedit control for that column, that was my first instinct, but then I couldn't figure out how to get the string value in the combo box to display in the group row when grouped by that row, it still shows 0,1,2,3, etc in the group row caption, and I want it to show the string value of that row in the comboedit control. Also keep in mind that this column is not visible in the grid, it is only used for grouping, so all I am talking about is the group row caption.

                                Thanks,
                                Josh

                                0

                                Hello Josh,

                                You need to use the ImageComboBoxEdit in-place editor, not the ComboBoxEdit. Please see the sample project attached.

                                Thank you, Alex.

                                0

                                Thanks Alex,

                                I am trying to use an ImageComboBox repository item in a grid, and I have filled with with 5 items, each with a numeric value. The dropdown contains the correct items, and if I select an item from the list in the autofilter row, the correct entries are filtered, but the detail rows do not show any value in this column. However, if I click on a detail row, and click the dropdown button for this field, the list displays properly, but the correct item in the list is not being selected.

                                Am I missing something, or does your example only work in the group row?

                                By the way, I am a VB programmer so it is difficult for me to follow examples given to me in C#.

                                Thanks,
                                Josh

                                0

                                Hello Josh,

                                Thank you for the response. I'm afraid that the problem is not quite clear to me. I have converted the sample to VB and it works as expected for me. Could you please change it to reproduce the issue, and attach it to your next message? Please also describe the steps to reproduce the problem.

                                Thanks,
                                Stan.

                                0

                                Hi Stan,

                                Thanks for the help. The problem is that the row in question was an int16 in the dataset designer. When I changed it to an int32 everything worked as expected. The datatype in the Access database is set to Integer, so I'm not sure why the dataset designer decided to make it an int32, but I discovered that all of my Access Integers are int16 in my dataset.

                                Thanks,
                                Josh

                                0

                                The supplied example is functional and solves the issue.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners