Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

asp.net - GridView PreRender not firing after RowDeleted -


when deleting gridview row in ui (via linkbutton commandname="delete"), view not automatically refresh , continues display deleted row until take other action (manually refresh page, navigate away , again, etc).

in debugger, see row deleted, , both rowdeleting , rowdeleted events fire, gridview's prerender event not fire afterwards (in contrast, prerender event does fire when first loading page, when adding new row, etc).

i've used gridviews in similar configurations without having problem, don't see obvious differences. seems process aborting before prerender event, no exceptions being thrown, , stepping off end of rowdeleted event in debugger brings me ui though process completing normally.

any ideas should trouble or solution? other possibly-relevant details: gridview bound sqldatasource; data source not declare deletecommand; handle deletion calling stored procedure in rowcommand handler, after rebind gridview databind(), @ point can see gridview's rows.count has decreased 1 i'd expect. seems fine through rowdeleted event, then... nothing!

update: tried calling sp delete in rowdeleting handler rather rowcommand handler... made no difference. row still deleted processing terminates without calling gridview's prerender, , deleted row left on display until further ui interaction updates view.

update2: i'm not getting page's prerender event, precedes control prerender events. continue working backwards see if can find things halting, since stepping out of rowdeleted event seems end of line...

update3: i've been poking around more and, although complicates code, able things working declaring deletecommand in gridview's sqldatasource simple row (record) deletion, , in rowdeleted handler calling additional stuff had in stored procedure needs happen along primary deletion. while it's less convenient having primary deletion in 1 place , related processing in another, @ least it's working.

but don't know conclude this: deletecommand needed proper page life cycle? 1 shouldn't deletion in stored procedure in rowcommand handler? else? wish identify what, specifically, broken initial attempt...

just bind gridview fresh data database after deleting row.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -