StrataFrame Forum

How to connecting Dev Exp Grid validation to BO business rules

http://forum.strataframe.net/Topic22874.aspx

By Sierra Fourwinds - 4/23/2009

I've read through the many posts on grid use and business objects.  I've succesfully setup Dev Express grid control to work with my BO and save data.  I will use sparingly in my projects, but there are going to be times when I really want to use a grid control.  Can anyone point this beginning SF user in the proper direction on how to best connect my grid's validation to using the SF business rules on required fields?  Any advice would be much appreciated.
By ChanKK - 4/23/2009

Hi,

http://devexpress.com/Support/Center/p/CQ50255.aspx
By Trent L. Taylor - 4/27/2009

You will want to use a BusinessBindingSource or a Customer BBS class that will wrap your SF BO.  All of the broken rules when a save is called will trigger the same validations, etc.  Also, the error provider will also update the grid as well on the columns in error.  As you have already learned, grids are not always the best solution and are very heavy and not always intuative to the end-user.  But we too use them....EXTREMELY sparingly.  If you are going to use a 3rd party grid and are still looking around, Infragistics is the best we have run into to daate.  There are some other good ones out there, but the Infragistics grid is a solid grid.  DevExpress is good as well and we have a large number of users that use the DevExpress as well and are pleased in large part.
By Sierra Fourwinds - 4/28/2009

Thanks Trent.  I have a need for the vertical grid control of Dev Express in the medical research data collection process.  Last time I checked out Infragistics ( a while back ) it did not go vertical.

I am still confused.  I have a dev ex grid and the BBS objects and they communicate to add, update and save data as long as I do not violate any business rules.  Are you saying that somewhere without my programming a connection that the BBS/BO object is going to automatically return tothe grid the broken rules when it save the data?  I did not see that if it does.  I was thinking I was going to have to write code in the grid's events for validating columns or validating the row to interface with the BO's ability to validate the data and let me know the broken rule information.  Please have patience with this newbie questions!  Thanks.Smile

By Trent L. Taylor - 4/29/2009

I haven't played with the DevExpress grid is quite some time.  The very first thing that I would recommend doing is removing DevExpress from the forumula.  Drop on a standard DataGridView to ensure that your rules are presented as I have described.  Then work backwards.  There may be some additional logic that you will have to take into account for the DevExpress grid.  In any case, we never show the broken rules within the grid itself as it is generally not a user friendly environment and is prone to support calls.  We will generally evaluate the row prior to a new one being added and may have a rules section showing everything wrong that needs to be correct someplace else on the dialog.

By Sierra Fourwinds - 4/29/2009

Thanks Trent for the suggestion. I am going to work with just the standard Grid and focus on the row validation before any row is updated.