This is a migrated thread and some comments may be shown as answers.

Batch upload List View

1 Answer 97 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Alejandro
Top achievements
Rank 1
Alejandro asked on 26 Apr 2016, 07:54 PM

Hello, I have a RadListview where all the items are always in edit mode and I have a button outside the list that should save all the changes made on each of the items, the problem is that when I click on the button all the ddata typed on the controls in the lis view is lost so I always get empty values.

    protected void Button1_Click(object sender, EventArgs e)
    {        
        foreach (RadListViewEditableItem item in rlv_Opportunities.EditItems)
        {
            System.Collections.Hashtable newValues = new System.Collections.Hashtable();
            item.ExtractValues(newValues);
            string id = item.GetDataKeyValue("lequip_id").ToString();

            RadTextBox rtbSO = (RadTextBox)item.FindControl("rtb_SO");

            string strT = rtbSO.Text;        
        }

}

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 28 Apr 2016, 08:45 AM
Hello Alejandro,

If the new values are not present in the editor controls (the RadTextBox from the code snippet), this will indicate that the control is rebinding before the OnClick event of the button fires. This could be observed if you are binding the control on each postback. If so, please use the Advanced Data-Binding instead and see if the issue will be resolved.

If the problem persists, please elaborate on the exact configuration of your RadListView.


Regards,
Konstantin Dikov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
ListView
Asked by
Alejandro
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or