objective c - function to check if there is any empty cell in a multicolumn nstableview not working -
hi have written function check if there empty cell in multicolumn nstableview below.however function not working , checks columns in first row only.. suggestions.and right way check
-(bool)istablerowscontainingemptycells { for(int row=0;row< [[self.myarray arrangedobjects] count];row++) { nstablecolumn *column1 = [self.formfieldvalues tablecolumnwithidentifier:@"a"]; nstablecolumn *column2 = [self.formfieldvalues tablecolumnwithidentifier:@"b"]; nscell *cell1 = [column1 datacellforrow:row]; nscell *cell2 = [column2 datacellforrow:row]; nslog(@"cell1 %@ cell2 %@",cell1,cell2); if([[cell1 stringvalue] isequaltostring:@""]||[cell1 stringvalue]==nil||[[cell2 stringvalue] isequaltostring:@""]||[cell2 stringvalue]==nil) { return yes; } } return no; }
try
nscell *cll=[tableview preparedcellatcolumn:0 row:0]; nsstring *str=[cll stringvalue]; nsinteger len=[str length]; if (len ==0) { nslog(@"no data") }
Comments
Post a Comment