Solved

canceling edit in a gridview

Posted on 2014-10-03
1
109 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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