Manual Edit checkbox not in Hashtable

3 posts, 1 answers
  1. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 15 May 2013 Link to this post

    I would like to do a manual edit of a listview.

    I am looking at the Hashtable values and I do not see my checkbox key/value pairs.

    I have a checkbox field in the EditITemTemplate called getsMail. I am just displaying the values in a literal for now. textboxes and comboboxes show fine. But I need the checkbox values.

    protected void RadListView1_ItemUpdating(object sender, RadListViewCommandEventArgs e)
        {
            RadListViewEditableItem editedItem = (RadListViewEditableItem)e.ListViewItem;
            Hashtable newValues = new Hashtable();
            editedItem.ExtractValues(newValues);
     
            StringBuilder sb = new StringBuilder();
            foreach (DictionaryEntry entry in newValues)
            {
                sb.Append("key: " +entry.Key + " Val: " + entry.Value);
            }
     
            Literal1.Text = sb.ToString();       
        }
     
    thanks, Marty
  2. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 May 2013 Link to this post

    Hi Marty,

    You can access the text box and its value using the following:
    RadTextBox txt = e.ListViewItem.FindControl("RadTextBox1") as RadTextBox;


    Kind regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 21 May 2013 Link to this post

    Maria,

    I marked the answer as correct.  But, maybe the documentation should be changed so show this method for inserting and/or editing  listview and not the hashtable that does not seem to work for all controls.

    the hastable did not return values for checkboxes or password fields. Other i would suspect as well.

    I wasted several hours.

    Thanks, Marty

Back to Top