Hi All
I apologize for yet another dopey question. Using VS2005.
I wasn't sure if I should post this in ASP.net or C# forum, but because it is a ASP.net project I will post here. Basically, I am trying to populate a 6 column array as a gridview on my page databinds. Here is what I am using to do it:
Which worked fine for a 2 column array (populating columns 0 and 1), and it works fine for columns 1-5. But I am using this array to build a javascript funtion that is sent back to my page from the server, and the passed value from only column 0 is coming back "". All the others are populating fine.
The array data type is string (there are no problems with declaration), and each value is actually a number except columns 0 and 1. Col 0 is the longest string in the bunch, but it doesn't exceed more than about 20 characters in what I've been testing on.
Has anyone run into a problem like this before? I am really at a loss here, I've tried explicitly casting the cells[0].text as a string, and everything else I could think of, but to no avail. I have also tried response.write'ing the value read directly from the gridview, but this does not work either (well, I am sure it works, just not like I expected it to ;-) )
Any advice would be greatly appreciated.
Thanks a lot,
Alex
Ignorance of certain subjects is a great part of wisdom
I apologize for yet another dopey question. Using VS2005.
I wasn't sure if I should post this in ASP.net or C# forum, but because it is a ASP.net project I will post here. Basically, I am trying to populate a 6 column array as a gridview on my page databinds. Here is what I am using to do it:
Code:
protected void dgvDest_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
arDbl[0, e.Row.RowIndex] = e.Row.Cells[0].Text;
arDbl[1, e.Row.RowIndex] = e.Row.Cells[1].Text;
arDbl[2, e.Row.RowIndex] = e.Row.Cells[2].Text;
arDbl[3, e.Row.RowIndex] = e.Row.Cells[3].Text;
arDbl[4, e.Row.RowIndex] = e.Row.Cells[4].Text;
arDbl[5, e.Row.RowIndex] = e.Row.Cells[5].Text;
}
}
Which worked fine for a 2 column array (populating columns 0 and 1), and it works fine for columns 1-5. But I am using this array to build a javascript funtion that is sent back to my page from the server, and the passed value from only column 0 is coming back "". All the others are populating fine.
The array data type is string (there are no problems with declaration), and each value is actually a number except columns 0 and 1. Col 0 is the longest string in the bunch, but it doesn't exceed more than about 20 characters in what I've been testing on.
Has anyone run into a problem like this before? I am really at a loss here, I've tried explicitly casting the cells[0].text as a string, and everything else I could think of, but to no avail. I have also tried response.write'ing the value read directly from the gridview, but this does not work either (well, I am sure it works, just not like I expected it to ;-) )
Any advice would be greatly appreciated.
Thanks a lot,
Alex
Ignorance of certain subjects is a great part of wisdom