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

cancel insert on updating

4 Answers 55 Views
ListView
This is a migrated thread and some comments may be shown as answers.
moegal
Top achievements
Rank 1
moegal asked on 19 Mar 2013, 08:38 PM
I am doing manual editing. How can I close the insert template if I select edit and close the edit template if I select insert?

Thanks, Marty

4 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 22 Mar 2013, 03:54 PM
Hi Marty,

I prepared a small sample where I demonstrates how to achieve only one opened Edit/Insert  form at the same time. Give it a try and let me know about the results.

Kind regards,
Kostadin
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.
0
moegal
Top achievements
Rank 1
answered on 15 May 2013, 02:01 AM
do you have a listview example?

0
Accepted
Kostadin
Telerik team
answered on 18 May 2013, 06:40 AM
Hello Marty,

You could use the almost the same approach as the one in RadGrid. For instance:
protected void RadListView1_ItemCommand(object sender, Telerik.Web.UI.RadListViewCommandEventArgs e)
    {
        if (e.CommandName == RadListView.InitInsertCommandName)
        {
            RadListView1.EditIndexes.Clear();
        }
 
        if (e.CommandName == RadListView.EditCommandName)
        {
            if (RadListView1.IsItemInserted)
            {
                RadListView1.IsItemInserted = false;
            }
        }
    }

All the best,
Kostadin
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.
0
moegal
Top achievements
Rank 1
answered on 19 May 2013, 10:40 AM
that did it.  I was using:

RadListView1.ShowInsertItem(RadListViewInsertItemPosition.None); in conjunction with Visible="<%# !Container.IsItemInserted %>"
on my Add button and the button would hide and stay hidden.

Thanks, Marty
Tags
ListView
Asked by
moegal
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
moegal
Top achievements
Rank 1
Share this question
or