//ASP.NET CODE
CellPadding="2" ForeColor="Black" GridLines="None" AllowSorting="True"
Font-Size="X-Small" Width="450" align="center" ShowFooter="True"
>
<%# ((ProductSelected)Container.DataItem).ShoeNumber %>
<%# ((ProductSelected)Container.DataItem).ProductGender %>
<%# GetUnitPrice(decimal.Parse(Eval("ProductPrice").ToString())).ToString("N2") %>
Total:<%# GetTotal().ToString("N2") %>
//END ASP.NET CODE
//CODE BEHIND FUNCTION TO DELETE A PRODUCT FROM GRIDVIEW
protected void lnkDeleteSelected_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request.Form["chkSelectedItems"]))
{
string[] selectedItems = Request.Form["chkSelectedItems"].Split(',');
for (int i = 0; i < selectedItems.Length; i++)
{
try
{
Product.Delete(int.Parse(selectedItems[i]));
}
catch
{
}
}
}
}
//END CODE BEHIND
Kirtan PatelPosted Dec 10, 2009, 10:24 PM
send me your project files along with database (zip) in mail([email protected]) I will help you :)