Solved

canceling edit in a gridview

Posted on 2014-10-03
1
112 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 500 total points
ID: 40361562
If the grid disappears, it is because there is no data to bind to.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to check mis-spellings in a select SQL 2 51
WPF user control poped up from a window 1 44
Removing Version of .NET in Windows 10 17 109
Shared Service Environment 2 53
Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
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…

738 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