I have an UltraWinGrid 12.1 that works perfectly when the add row is on top. I want to give the user the option to switch the add row to the bottom. However, when they do that the behavior of the grid changes like this:
As soon as any key is entered into the add line, a new add row is shown (two lines with asterisks), confusing the user. This is different than when add row is on top, where you only have one asterisk line.
The only code that gets executed to move the add row to the bottom is this line:
grdGrid.DisplayLayout.Bands(0).Override.AllowAddNew = AllowAddNew.TemplateOnBottom
I should note that once this code is executed and you move the add row back to the top the double asterisk now appears on the top too! I can only clear it by leaving the screen and returning to it, initializing the whole thing. I analyzed the differences between the two saved grid layout XML files and the only difference if the value of <AllowAddNew>6 (for the bottom) versus 7 (for the top).
Hello Ted,
Thank you for contacting Infragistics. I just tested 12.1, and 18.1 and both behave the same. From what I can recall we always had a stationary add-row present above the one the end user is actually typing. As soon as a key press is made a new record is added to the grid. Because the add-row the user is typing in is actually an uncommitted record in the UltraGrid. We even include a TemplateOnTopWithTabRepeat option that lets the end user press tab, when in the last cell of the current add-row, and proceed back to the add-row. You might be interested in using FixedAddRowOnTop and FixedAddRowOnBottom. This reduces the extra add-row you see.
To summarize, both top and bottom settings should behave the same. Let me know if you have any questions.
Thank you for your reply Michael. I've been using Infrigistics grids for years and never had more than one row with an asterisk until we started using the TemplateOnBottom. The way it has always worked for us is that the user clicks on the asterisk (add) row, and fills out all columns without another asterisk line ever appearing. When they are done adding the line they can tab past the end or press enter to commit the row and then a new empty asterisk line appears at the top. I will look into the FixedAddRowOnTop/Bottom and get back to you. The weird thing to me is how the behavior of the top row add changes after only changing to AllowAddNew.TemplateOnBottom and then back to AllowAddNew.TemplateOnTop.
Hi Ted,
I've been looking into this and I'm very confused by what you are describing here.
I tried using TemplateOnTop and TemplateOnBottom. The way these work is that the grid displays a TemplateAddRow either on the top of the bottom. When the user modifies the TemplateAddRow, the TemplateAddRow becomes an AddRow and a row is added to the DataSource by calling AddNew on it. It HAS to do this and this is the way it has always worked. The TemplateAddRow can display without an AddNewRow in the data source, because it doesn't really have to do much - it's just displayed. But once the user starts editing, there HAS to be a row in the data source backing up the grid row or nothing would work properly. I tried this as far back as I could with the oldest version of the controls I have available and it always worked this way.
BTW... this functionality was modelling after MS Access - and that's they way it behaves there, as well.
If you don't want a new TemplateAddRow to appear immediately, you should probably be using AllowAddNew.FixedAddRowOnTop and AllowAddNew.FixedAddRowOnBottom. It seems like that will give you the behavior you want.
I agree with your assessment on this behavior and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 254858. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
In addition, I've created a private support case for you **CAS-196657-H2D9J8**, which you will see in your support activity section of your account. Head over to the "In Development" section for more details.I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
Yes, all these screenshots have two rows with asterisks - IMO and experience there should always be just one.
Thank you for following up. I attached a screenshot and a sample below demonstrating how I toggled the AddNewRow property from Top, Bottom, and Top again in version 12.1.
Please let me know if you experience anything differently or have any questions.
0882.WindowsFormsApplication1.zip