Current filter:
                                You should refresh the page.
                                0
                                  • I am using the ASPxNewControl with an XPCollection of new objects which has a property for each text field ( title, image url, body, date,etc) and I have specified in my code the links between the control and the class. But I noticed that if I dont have data in the image field in the SQL db, when I try to databind the control to the XPCollection, it tells me there is no field for ImageURL in my collection class. I also noticed this with the Date, it could be with all fields. The problem with this is I may not have an image for each story so now I have to specify a 1pxl spacer.gif instead of leaving the image blank. This has to be a bug.

                                    Steps to Reproduce:

                                    NewCol = new XPCollection<MaxNews>(XPOsession);

                                    ASPxNewsControl1.DateField = "StoryDateTime";

                                    ASPxNewsControl1.TextField = "TextBody";

                                    ASPxNewsControl1.HeaderTextField = "HeaderText";

                                    ASPxNewsControl1.ImageUrlField = "ImageURL";

                                    ASPxNewsControl1.NameField = "OID";

                                    ASPxNewsControl1.DataSource = NewCol;

                                    ASPxNewsControl1.DataBind();

                                    Expected Results:

                                    if there is no image data, it should still bind and it should not try to show an image for a new article that doesnt have one.

                                0

                                A little more info. If you have 2 records, and one has an image value, and the other doesnt, the control will bind but if all items dont have any data for the item ( ie. no picutre) and all the values are null, it will not bind.
                                You just have to comment out the ASPxNewsControl1.ImageUrlField = "ImageURL"; untill you have a image in a record.
                                Also there is no way to disable images other than commenting out this line of code..

                                0

                                Hello Jeremy,

                                Thank you for your report. We've reproduced the problem and we are looking for a solution.

                                Thanks,
                                Nick

                                Test.zip
                                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.