Gridview blanks cell returns   !!!
-
hi when I tried to get the value of current row of the gridview, the blank cell return , how can I prevent that ? thanks
jooooo
-
hi when I tried to get the value of current row of the gridview, the blank cell return , how can I prevent that ? thanks
jooooo
Can you post here a block of code and grid event name in which you are trying to get it ?
Parwej Ahamad R & D: REST services with WCF
-
Can you post here a block of code and grid event name in which you are trying to get it ?
Parwej Ahamad R & D: REST services with WCF
thanks my friend the event :
GridView1_RowCommand
switch(e.CommandName) { case ("Edit"): GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent; txtID.Text = row.Cells[0].Text; txtName.Text = row.Cells[1].Text; }
then if the cell is blank it's return& nbsp
jooooo
-
thanks my friend the event :
GridView1_RowCommand
switch(e.CommandName) { case ("Edit"): GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent; txtID.Text = row.Cells[0].Text; txtName.Text = row.Cells[1].Text; }
then if the cell is blank it's return& nbsp
jooooo
Please try this way for getting the current row:
int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = YourGridView.Rows\[index\]; txtID.Text = row.Cells\[0\].Text); ...................
Parwej Ahamad R & D: REST services with WCF