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.

iphone - how to display table view cells whenever we need to click on one cell -


i writing 1 app in app have display tableview 2 cells.while first cell touched user have show other cells within view (i cant use navigation here) , second cell visible..can 1 tell me suggestion this. thank all.

if want insert table view cells when clicking on cell, try following code.

lets consider going insert 3 rows in position 1, 2 , 3 in section 0. in didselectrowatindexpath method, following. here rows inserted in section 0, if select row 0(first row) in section 0(first section).

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath {     if (indexpath.row == 0 && indexpath.section == 0) {         // create indexpaths rows going insert         nsindexpath *indexpath1 = [nsindexpath indexpathforrow:1 insection:0]];        nsindexpath *indexpath2 = [nsindexpath indexpathforrow:2 insection:0]];        nsindexpath *indexpath3 = [nsindexpath indexpathforrow:3 insection:0]];         // increase number of rows in section 0 3, inserting 3 rows here         numberofrowsinsectionzero = numberofrowsinsectionzero + 3;         // insert rows         [self.tableview insertrowsatindexpaths:[nsarray arraywithobjects:indexpath1, indexpath2, indexpath3, nil] withrowanimation:uitableviewrowanimationfade];     } } 

in numberofrowsinsection method, should having following,

- (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection: (nsinteger)section {      // code here      if (section == 0) return numberofrowsinsectionzero;      // code here } 

and make sure having appropriate code in cellforrowatindexpath method display content in newly displayed rows.

note: have alter code in such way rows not inserted when clicking row 0 of section 0, when been inserted.


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 -