Solved

canceling edit in a gridview

Posted on 2014-10-03
1
108 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
1 Comment
 
LVL 96

Accepted Solution

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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