0

I need to GetThe Dynamic Values of Row1 Row2 Row3 Etc.

My Code
enter code here
<script type="text/javascript">
$("document").ready(function(){
$(".addComment").btnAddRow({rowNumColumn:"rowNumber"});
$(".delRow").btnDelRow();

});
</script>

<table border="1" class="autoTable">

<tr><td>Your Name</td>
<td>Your Age</td><td> </td>
</tr>
<tr><td>
<input type="text" id="wonder" size="25"/>
</td>
<td><input type="text" id="good" size="25"/>
</td>
<td><input type="button" value="Delete" class="delRow"/>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="button" value="submit"/>
</td>
<td>
</td>

</tr>
</table>
Here I get Dynamic Column of Age and Name While clicking addbutton,How to extract the Age value & name for the all dynamic Rows Any Idea?

I tried the following

$(".addComment").btnAddRow({rowNumColumn:"rowNumber"});
$(".delRow").btnDelRow(function(row){
if(row) var a=$("input#good").val(); alert(a) });
It will Give the First Row Value; and Regarding secondRow it alerts null
Any Ideam

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jt86442
0


Hi use can use this code. May be it will work.

for (int rows = 0; rows <= GridView1.Rows.Count - 1;rows++ )   
           {   
               for (int cells=0;cells<=GridView1.Rows[rows].Cells.Count-1;cells++)   
               {   
                   //Get text of each cell like the following and process it   
                   string s = GridView1.Rows[rows].Cells[cells].Text;   
               }   
                  
           }  

 for (int rows = 0; rows <= GridView1.Rows.Count - 1;rows++ )
            {
                for (int cells=0;cells<=GridView1.Rows[rows].Cells.Count-1;cells++)
                {
                    //Get text of each cell like the following and process it
                    string s = GridView1.Rows[rows].Cells[cells].Text;
                }
                
            }
0


Hi you can use this code. May be it will work.

for (int rows = 0; rows <= GridView1.Rows.Count - 1;rows++ )   
           {   
               for (int cells=0;cells<=GridView1.Rows[rows].Cells.Count-1;cells++)   
               {   
                   //Get text of each cell like the following and process it   
                   string s = GridView1.Rows[rows].Cells[cells].Text;   
               }   
                  
           }  

 for (int rows = 0; rows <= GridView1.Rows.Count - 1;rows++ )
            {
                for (int cells=0;cells<=GridView1.Rows[rows].Cells.Count-1;cells++)
                {
                    //Get text of each cell like the following and process it
                    string s = GridView1.Rows[rows].Cells[cells].Text;
                }
                
            }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.