简体   繁体   中英

gridview databind stops after processing

I am having trouble with a GridView DataBind in C#. Whenever I run the DataBind method, it binds the data to the GridView, but then ignores any other commands I call after. I had no problem doing this with DataGrid's, but I'm not sure why it's not calling any of my functions after it binds.

I'm using MessageBox.Show() to confirm my suspicions (crude but effective). Is there something I should be looking for in the Debug or Breakpoints that can give me some indication of why it just stops processing once it finishes the DataBind ?

An unclosed tag, like a div, has caused me that same behaviour before. Check if they are ok. Having duplicate IDs inside the grid has caused me this as well. For some reason being inside the gridview doesn't make the compiler raise any flags of duplicate ids.

Wow. Now I feel like a fool. I commented out the extra events from my GridView and it was able to finish processing. Thanks for all the help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM