Hello everyone,
I have some problem with RadGrid multi row option, detailed as below.
I have One RadGrid with property allowmultirow=”true” & have embedded Usercontrol for edit operation.
Have command item template with commandname = “UpdateAll” which will update all the rows which were in edit mode.
In order to set row in edit mode, I have used edit command column, which is an imagebutton.
So, whatever row user wants to edit, he will click on that imagebutton & the UserControl will be loaded with all the relevant data, user will do the same for all the rows which he wants to edit,
And after that he will click on Updateall button, which will call the itemcommand event of grid and update all the data.
Now, the problem is while user click on edit command column my user control will be loaded with all its prerender, init event for the selected row.
After that suppose I make some changes in the some of the fields of user control, say we have textbox with user name which was initially loaded blank & I make changes it to ‘XYZ’.
Now again I select another row for edit operation. So again my user control will be loaded for this row as well as the previous row which I have selected.
So, whatever changes I have been made previously i.e. set user name = ‘XYZ’ from blank, will be again set to Blank,
WHY USERCONTROL IS LOADED FOR THE PREVIOUS ROW ????
That is my question, as it is degrading my applications performance,
As it is initialling user control for all the row which is in edit mode all the times, rather than calling it for the corresponding row selected and leaving other as it is. &
also initialize all the control and lose all the changes that I have made previously.
The required files are attached herewith...
Screen Name is FrmPaymentEntry.aspx & its code behind file.
User control name is EDIPostpaymentControl.ascx & its code behind file.
& the Java script file name is PostPaymentScript.js
Manoj Panchal