?
Solved

canceling edit in a gridview

Posted on 2014-10-03
1
Medium Priority
?
118 Views
Last Modified: 2014-10-09
when I use the following code the message triggers then the gridview simply disappears.
does any know why this would happen,  I assumed the row would just go back to edit

thanks
gary

 Protected Sub Customer_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs)
       
        Dim row As GridViewRow = CustomersGridView.Rows(e.RowIndex)
        Message.Text = "Edit cancelled! No records saved." & e.RowIndex

        'Reset the edit index.
        CustomersGridView.EditIndex = -1
        'Bind data to the GridView control.
        CustomersGridView.DataBind()
       

    End Sub
0
Comment
Question by:javagair
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 40361562
If the grid disappears, it is because there is no data to bind to.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question