Current filter:
                                You should refresh the page.
                                0
                                  • Hello
                                    I have question to gridControl/gridView:
                                    I'm using the gridView with images in the datasource (datasource is a bindingsource, and the data comes via entity-framework). With this code, i set the image-properties in the gridControl:

                                    	
                                    [C#]
                                    ...... ...... if (checkEditMitPatientenFoto.Checked) { DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit picEdit = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit(); picEdit.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; picEdit.CustomHeight = 40; picEdit.NullText = string.Empty; gridViewSearch.Columns["patientenFoto"].ColumnEdit = picEdit; gridViewSearch.Columns["patientenFoto"].MaxWidth = 40; gridViewSearch.Columns["patientenFoto"].Width = 40; gridViewSearch.OptionsView.RowAutoHeight = true; } else gridViewSearch.OptionsView.RowAutoHeight = false; ... ...
                                    This works fine - but not all rows have an image in the database; and there is in the row with no image a standard-text or a null-text in the image-column. You can see this in the attachment....
                                    But i set the "picEdit.NullText = string.Empty".....so it must be an other property or an other option.

                                    Please can you give me a clue, how i could delete this standard-text, if no image-data is in the row??

                                    Many thanks in advance for your help & best regards
                                    Michael

                                QuestionToGridViewWithPicture.png
                                0

                                Hello

                                I have found the solution / or a workaround:

                                I set the "nullText"-property to "space" and not to string.Empty or null !!!

                                	
                                [C#]
                                DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit picEdit = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit(); picEdit.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; picEdit.CustomHeight = 50; picEdit.NullText = " "; gridView.Columns["PersonenFoto"].ColumnEdit = picEdit; gridView.Columns["PersonenFoto"].MaxWidth = 50; gridView.Columns["PersonenFoto"].Width = 50; gridView.OptionsView.RowAutoHeight = true;

                                Now i saw no text in the image-column, if no image-data comes from the datasource.

                                Best regards
                                Michael

                                0

                                Thanks Michael.


                                I am also facing same problem but finally solved.

                                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.