I am using RadGrid to update records with quite a few columns. Due to having so many columns, I have decided to use RowDetails with data templates that contain about 40 controls (mainly ComboBoxes, TextBlocks, and TextBoxes). On the actual row, there are 8 columns. I needed the user to be able to filter on values in several columns that would have been GridViewComboBoxes columns and filtering on numeric ID's would not work. In order to avoid confusion, I have marked all of those columns as read only and the user is to only edit data in the RowDetails. I have a Button in the cell template of the last column on the grid that is using RadViewCommands.Delete. I also have two buttons outside of the grid for saving and canceling. These are calling SubmitChanges and RejectChanges on the model.
Problem #1 - I cannot figure out how to set the focus after an add to the first Textbox in the RowDetails. There is no visual indication that any control has focus after Add New Item is clicked.
Problem #2 - After clicking the Add New Item, the escape key does not work to get out of the row edit. I have to click on a cell on the actual row (not row details) and then the escape key takes out out of the record. After you have done this, the escape key works fine after clicking Add New again. It just has the problem after the first escape until you have clicked on a row.
Problem #3 - The first time you click Add New Item, the button associated with the delete command is greyed out. This is the desired effect. All the other rows still have the button enabled. Upon clicking on the row to get around problem #2, all of the delete buttons are now greyed out. I would prefer to have all of the buttons greyed out when in insert or edit mode. After hitting escape and adding another new row all of the buttons are still enabled until you start making changes to the record and then all delete buttons are greyed out. I am not sure why there is an inconsistency. Maybe solving problem #2 will solve this one.
Problem #4 - It is not always user friendly to use the escape key to get out of a row edit. I have seen users try to click the Cancel button that is outside of the grid to try to get out of the row edit. I tried to set the button to a CancelRowEdit command, but then the button is disabled when you are not editing a row. I have tried to manually call the CancelRowEdit method, but that doesn't seem to work for cancelling an insert. I have tried changing the value of ActionOnLostFocus but I just cannot get the results that I want. I would like the button to have dual purposes: #1, submit changes to the model and #2, cancel any edit or insert that is in progress.
Problem #5 - I am trying to enable and disable the save and cancel buttons based on if the user made any changes or not. I have code that allows for manual control by setting a property on the entity or an automated method that checks HasChanges on the entity. Unfortunately I have some fields that I have added to the model to store descriptions based on ID's that are in the database. When I load up the data I have to populate those fields and that triggers the HasChanges. While I look for a solution to that problem, I wanted to implement the manual method of setting the manual property on the entity. Because all of the editing of data is being handled in the RowDetails, I am having difficulty finding an event to trigger when a change is made. I would hate to have to add events to every single control I have in the RowDetails template. Is there something else I can use?
Any help would be appreciated.
-Randy
Problem #1 - I cannot figure out how to set the focus after an add to the first Textbox in the RowDetails. There is no visual indication that any control has focus after Add New Item is clicked.
Problem #2 - After clicking the Add New Item, the escape key does not work to get out of the row edit. I have to click on a cell on the actual row (not row details) and then the escape key takes out out of the record. After you have done this, the escape key works fine after clicking Add New again. It just has the problem after the first escape until you have clicked on a row.
Problem #3 - The first time you click Add New Item, the button associated with the delete command is greyed out. This is the desired effect. All the other rows still have the button enabled. Upon clicking on the row to get around problem #2, all of the delete buttons are now greyed out. I would prefer to have all of the buttons greyed out when in insert or edit mode. After hitting escape and adding another new row all of the buttons are still enabled until you start making changes to the record and then all delete buttons are greyed out. I am not sure why there is an inconsistency. Maybe solving problem #2 will solve this one.
Problem #4 - It is not always user friendly to use the escape key to get out of a row edit. I have seen users try to click the Cancel button that is outside of the grid to try to get out of the row edit. I tried to set the button to a CancelRowEdit command, but then the button is disabled when you are not editing a row. I have tried to manually call the CancelRowEdit method, but that doesn't seem to work for cancelling an insert. I have tried changing the value of ActionOnLostFocus but I just cannot get the results that I want. I would like the button to have dual purposes: #1, submit changes to the model and #2, cancel any edit or insert that is in progress.
Problem #5 - I am trying to enable and disable the save and cancel buttons based on if the user made any changes or not. I have code that allows for manual control by setting a property on the entity or an automated method that checks HasChanges on the entity. Unfortunately I have some fields that I have added to the model to store descriptions based on ID's that are in the database. When I load up the data I have to populate those fields and that triggers the HasChanges. While I look for a solution to that problem, I wanted to implement the manual method of setting the manual property on the entity. Because all of the editing of data is being handled in the RowDetails, I am having difficulty finding an event to trigger when a change is made. I would hate to have to add events to every single control I have in the RowDetails template. Is there something else I can use?
Any help would be appreciated.
-Randy