I am quite surprised you haven't gotten a useful reply on this yet. There are several very strong users of DevExpress controls in this forum.
My own experience, so far, is limited to CSLA 1.5 with which the DevExpress grid behaves wonderfully. I would be VERY surprised if it incapable of data binding as suggested by the other poster. In my opinion, those kinds of judgement on the scarce sort of information you provided in the first post are nothing but a cheap shot that do a dis-service to those who may be looking for information about competing tool set offerings.
But let's focus on your real problem. You mention that the second column is dependent on the first column. Can you give us an explanation (or the actual code) that describes this dependency? Perhaps your implentation of the validation of the two properties in question has your UI in a no-win position when Property A wants to be populated when Property B isn't? This sounds more likely to me than a shortcoming in the DevExpress grid.
But we'll see!
Q Johnson:I would be VERY surprised if it incapable of data binding as suggested by the other poster. In my opinion, those kinds of judgement on the scarce sort of information you provided in the first post are nothing but a cheap shot that do a dis-service to those who may be looking for information about competing tool set offerings.
Sorry if the remark seemed unduly harsh. Thanks for your clarification on intent. I'm happy and hope you are <g>... so to the problem.
Yes, that's my understanding how the grid should handle adding an item, too. However, it shouldn't try to add the item until the user commits the row by hitting enter or selecting a different row, should it? The OP said he got an exception when he changed columns - not rows. We don't even know if he tried to commit the row. So we surely can't know if AddNew should have fired. Anyway - no big deal here.
I'm hoping to hear back from him so we can get to the bottom of this. But I fear he found an unfortunate dependency in validation rules between the two properties bound to the first two columns of his grid and has already solved his problem... which leaves us here wasting time, I guess.
Q Johnson:Sorry if the remark seemed unduly harsh. Thanks for your clarification on intent. I'm happy and hope you are <g>... so to the problem.
No, my understanding is that the new object is created at the moment the new row is added to the grid (so if you're on the last row and start typing in a column, before anything else it will create the new object using AddNew). It needs to do this, because it needs the new object to store the data the user entered. If the user commits, EndEdit is called on the object I believe. If the user cancels, the new row is removed (which is why its important for objects created in AddNewCore to have a unique value returned by GetIdValue and not just -1 for ALL new objects).Q Johnson:Yes, that's my understanding how the grid should handle adding an item, too. However, it shouldn't try to add the item until the user commits the row by hitting enter or selecting a different row, should it?
Q Johnson:The OP said he got an exception when he changed columns - not rows. We don't even know if he tried to commit the row. So we surely can't know if AddNew should have fired. Anyway - no big deal here.
No, AddNew should have been fired as soon as the user started editing the first column.
re: >> the new object is created at the moment the new row is added to the grid (so if you're on the last row and start typing in a column, before anything else it will create the new object using AddNew). It needs to do this, because it needs the new object to store the data the user entered. If the user commits, EndEdit is called on the object I believe. If the user cancels, the new row is removed (which is why its important for objects created in AddNewCore to have a unique value returned by GetIdValue and not just -1 for ALL new objects). <<
Thanks for correcting my impression of that. I guess the grid is trying to add the row after he gave it some data to try and save (as a result of his update of the first column). If it tried after simply clicking in the new row section of the UI, he wouldn't even have gotten to enter data into that cell, right?.
Good info. Thanks. And it's also the expected good news that Dev Express' grid didn't have any trouble in this scenario, once the BO was coded properly. So everybody's happy.
btw, could you give me a quick pointer on how you select the text from the previous posting to copy here. It looks like there's a special technique to it that I am not using.
Thanks again.
Q Johnson:Thanks for correcting my impression of that. I guess the grid is trying to add the row after he gave it some data to try and save (as a result of his update of the first column). If it tried after simply clicking in the new row section of the UI, he wouldn't even have gotten to enter data into that cell, right?.
Q Johnson:Good info. Thanks. And it's also the expected good news that Dev Express' grid didn't have any trouble in this scenario, once the BO was coded properly. So everybody's happy.
Yes, I should have probably asked about that first, but its one of those details I forgot about.
You use <quote user="userName"></quote>, except you use square brackets instead of the angled ones. If you click Quote instead of reply, you'll see how to do it.Q Jhonson:btw, could you give me a quick pointer on how you select the text from the previous posting to copy here. It looks like there's a special technique to it that I am not using.
Copyright (c) Marimer LLC