In the attached project, grid2 (the lower grid) does almost all of the above. There are a couple of problems however:1.) if the user inputs an account number or name but not a quantity, the update method is not called. I beleive this is because Acct No/Name columns do not cause a DataItem to be generated when their values change. Since there is no editor, how do I accomplish this?2.) the grid alwayus apppears to be in edit mode.... note the visual differences vs. grid1.
grid1 in the attached project is related to the question I asked here: http://es.infragistics.com/community/forums/p/79192/400321.aspx#400321This grid is visually correct however I am unable to figure how how to access the controls in each row such that I can populate data values, set focus, etc.
I really dont care how the above desired behaviors are achieved I just need this to work. What ever is fastest, easiest, and the least amount of code is fine with me.
SamsControls.dll exists in the Lib directory.
Thanks for your help.
Hello Sam,
Thank you for your post. I have been looking into the functionality that you are trying to achieve and regarding the list of requirements that you have provided, here is how you can implement them:
Regarding the first issues that you have described, I assume that by update method, you are referring to the RecordUpdated event. The event is not firing for the AddNewRecord and it seems that the reason for that is, as you have mentioned, that you are not using editors in the XamDataGrid at the bottom. The reason for that is, that the new record is added to the data source of the XamDataGrid, when you edit a value of one of the editors of the add new record. Since you are not having an editor, the XamDataGrid is not adding an item into the DataSource, until you type a value into the “QTY” field. What I can suggest is using your SelectorTextBox as in the XamDataGrid at the top of the window. Using an editor allows you to have default feature of the XamDataGrid and also to have better appearance. Regarding the second issue that you have described, the reason for the appearance that you are having, is that you are not having editor in the template of the CellValuePresneter. As I have mentioned, you can use the ValueEditor that you have created in order to be able to control the appearance of the cells in both edit and non-edit mode. I have modified the sample application that you have attached in order to implement the above changes.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Krasmir, you have really gone above and beyond the call of duty. Thanks very much for your help. Your example code works great.
Sam