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.

c# - Make new row dirty programmatically and insert a new row after it in DataGridView -


i've editable unbounded datagridview. i'm changing value of new row programmatically.

normally, when user types in field of new row, becomes dirty , new row inserted below it.

but in case, when user comes in field of new row, i'm trapping function key , changing cell value programmatically.

mygrid.currentcell.value = "xyz";

and doesn't insert new row below it.

now work around tried on cellvaluechanged event handler.

  if (mygrid.newrowindex == e.rowindex)   {     mygrid.rows.insert(e.rowindex + 1, 1);   } 

but throws error saying no row can inserted after uncommitted new row..

how tell mygrid i've made current row (which new row) dirty , there need of new row after it?

i working on winforms datagridview. in case tried @isid solution, here aid in that, tried

mygrid.notifycurrentcelldirty(true); mygrid.notifycurrentcelldirty(false); 

by making current cell dirty in not working, have commit cell also. in next command flagging current cell not dirty, enforce datagridview add dirty row. working in project.


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 -