خرید بک لینک

Vote count: 0

I am having two issues with my gridview:

(1) My gridview data is displayed using boundfield. I want to fetch the value from that particular cell (cell number 4, starting from cell 0) on Selected Index Changed event but I can't do it because if the cell is null, it fetches '&nbsp' instead of "".

My codes are as follows:

<columns>

<asp:Boundfield DataField ="Weight" SortExpression="Weight" HeaderText = "Weight" />

<columns>



SelectIndexChnged (object sender, EventArgs e)

{

try
{

int rowIndex = gridview1.SelectedRow.RowIndex;

String ID = gridview1.DataKeys[rowIndex].Values[0].ToString();

String Weight = gridview1.SelectedRow.Cells[4].Text.ToString().Trim();

}

catch (exception e)

throw e;

}

(2) On the gridview itself, I have an image button which displays a popup when clicked. Inside the popup, the I have another small gridview. I have been able to add page indexing to that gridview, but everytime I click on a page index number, the popup closes and when I click on the popup button, the gridview is now placed on the index which I had cicked but the inxed is not highlighted.

Please help.

Thank you.

asked 4 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 22 فروردين 1395 ساعت: 18:58

صفحه بندی