Hi,
I am using IG version 14.1.I have IG grid with edit functionality(Add/Edit/Delete) turned on.In the grid's last column I have two button Up and Down.On the click of Up and Down button I want to move that particular row from which button is clicked.I am able to sort the column on UP and down button click but not sure how to move only specific row.Will appriciate the quick help.
Thanks-Ashish
Hello Ashish Agarwal,
Thank you for contacting Infragistics!
We received your support request concerning igGrid's edit functionality, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I have a couple questions for you. First, what technology are you using? Are you using our jQuery controls? Please confirm this for me so that I can work to get your issue solved as soon as possible. I am looking forward to hearing from you.
Yes I am using Ignite UI 14.1 version.
Thank you for your response. I am currently working to create a sample for you to provide you with an example of this functionality. I will get back to you by the end of the day today or tomorrow before noon with more information for you. Thank you for your patience.
Thank you for your patience. Through some research, I have found a way for you to achieve the functionality you are looking for. Please refer to my sample for the following explanation. In my sample, I have created an unbound column which has values [i] which are assigned upon the creation of a row. The Up and Down buttons make calls to rowUp and rowDown, respectively, and pass in the value of this unbound column. This next part is where you will have to do some editing to get the functionality perfect, as the current logic is not fully implemented. When rowDown is called, it takes the value in the 'Val' column of the row and increases it by one. It then sorts in ascending order based on this column. This effectively drops the row down because we are sorting on this column and it has dropped to a lower value. Your next step in this will be to find a way to swap the values in the 'Val' column between the two rows you want to swap. For example, if you wanted to move the second row down, you would have to increase 'Val' in this row by 1 and decrease 'Val' in the third row by 1. This would cause the second row to move to the third after ascending sorting is applied. Once you have the logic complete, you can then hide the 'Val' column and all of this functionality will happen behind the scenes. The only reason I made the column visible is for testing purposes.
You may also want to look at a forum post which gives a great explanation of dragging and dropping rows. Martin Pavlov includes a sample which includes this functionality, and may be very helpful for you moving forward. You can find the thread here: http://ko.infragistics.com/community/forums/p/78376/409045.aspx .
After my team and I have reviewed this functionality, this row moving functionality has also been determined to be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
There are many benefits to submitting a product idea:
- Direct communication with our product management team regarding your product idea.- Notifications whenever new information regarding your idea becomes available.- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.- Allow you to shape the future of our products by requesting new controls and products altogether.- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea: 1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics. Please do not hesitate to contact me with any further questions.
Hello Ashish,
Is there anything else I can assist you with on the matter? Please do not hesitate to contact me with more questions.