We are using Syncfusion grid version 1.6.8. It would be greatly appreciated if you could help in solving the below mentioned problems.
1. We have set Max Length property for grid cells. This works if the user enters data by typing into the grid but fails if the data greater than max length is pasted on a cell.
2. We have logic coded in CellKeyUp() to add a new row when user hits Enter Key on the last column of the grid. In one of the grids, the last column happens to be Amount column. Here if the user enters invalid value a message box gets displayed “Invalid amount entered.”
If the user closes this message box by pressing the Enter Key, the logic on the CellKeyUp() event gets triggered and a new row gets added.
Note: This happens only if ‘Tab’ key is used to leave the last cell with invalid value.
Can it is possible that on click of any Modal form the CellKeyUp() event should not be triggered as the Enter key was not pressed for that Cell.
3. Another problem is if the copied data is multi-line text and user tries to paste the same within a cell, the application gives an error.
Thanking in advance for your response and cooperation.
2) I think the simplest way to handle this would be to set a flag in your meesage box that displays the error message. Then in CellKeyUp, only execute the new row code if this flag is not set, and also reset the flag after you test.
3) By default, the grid interprets newlines from the clipboard as information to be added in a new row. So, it will not paste text with newlines in it into a single cell. If you want this behavior, then you will have to handle the entire paste yourself. You can do this by catch the grid.Model.ClipboardPaste event.
You can also get an error if you paste at the bottom of a GridDataBoundGrid text that contains newlines if there is insufficient number of rows to how the pasted text with the newlines. You can handle this problem by adding additional lines in ClipboardPaste. Here is a forum link that discusses this. http://22.214.171.124/Support/Forums/message.aspx?MessageID=6472