When I debugged I found that the rowindex is always -1 in this piece of code so it is actually never getting the correct row...any ideas why?
e.Row.Attributes.Add("onclick", "__doPostBack('ctl00$ContentPlaceHolder1$PharmacyGrid','Select$" + e.Row.RowIndex.ToString() + "')");
I tried adding...
string test = ((Label)PharmacyGrid.SelectedRow.FindControl("SearchDGLblName")).Text;
but it always is the first item in the gridview and not the one I selected...
Is my RowCreated method correct? Shouldn't I be able to access the values of the row clicked after it has done...
Here is what I have...
<asp:Gridview Visible="true" ID="PharmacyGrid" SelectedIndex="0" RowStyle-Font-Size="X-Small" EnableViewState="true" AutoGenerateColumns="false"
AlternatingRowStyle-BackColor="WhiteSmoke" runat="server" Width="750px"...
I have a gridview where I want to select a row and do a postback...
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
e.Row.Attributes.Add("onclick", "__doPostBack('ctl00$ContentPlaceHolder1$PharmacyGrid','Select$" + e.Row.RowIndex.ToString() +...
I'm having one more issue with the Mozilla/Firefox browser...
This code works perfectly in IE but not in Mozilla.
It adds a new cell in a table row for a validation message but the new cell isn't being added for mozilla.
function displayInlineError(firingObj,errorText)" );
{...
The red highlighted portion of this code is throws fits in Mozilla but works fine in IE...Im trying to make this cross browser compatible so does anything jump out in this that Mozilla is going to throw a red flag at????
function AddMenuOptions(strID,ParentChartId)
{
var inputColl =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.