Raja

Raja

  • NA
  • 2k
  • 355.8k

How to validate column in between given position?

Oct 3 2016 8:16 AM
i have 45 rows and 45 columns in data table.<br /> * validate third column,(12 Th row to 39 row)in this in between field have at least one value(my requirement is the value is '1')<br /> * if 3rd column 19 row value is '1' then other fields or empty.that's not a problem.<br /> * if no row have any value then only through the error <br /><div> How to do it.</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div><strong>What I have tried:</strong><br /> <br /> i have used looping for rows and column given below.<br /> <div id="premain922038" style="100%;display:block;"><span id="prehide922038">Hide</span> <span id="copycode922038">Copy Code</span></div><pre id="pre922038">for(int j= 3; j&lt;= columncountvalue; j++)<br /> {<br />for (int i = 12; i &lt;= rowcountvalue; i++)<br /> {<br /> if (ds.Tables[s].Columns[3][i].ToString().Trim() == "") <br /> {<br /><br /> // statements<br /> }<br /> }<br /> }</pre> <br /> <div id="premain204512" style="100%;display:block;"><span id="prehide204512">&nbsp;</span><span id="copycode204512"></span></div><pre id="pre204512" style=" 0px;"><span style="background-color: #ffff00;">now i want which condition used for that requirements. </span></pre>&nbsp;</div>

Answers (1)