Click here to Skip to main content
15,891,567 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Fill a GridView to select data from a GridView Pin
nagendrathecoder14-Apr-10 2:05
nagendrathecoder14-Apr-10 2:05 
GeneralRe: Fill a GridView to select data from a GridView Pin
tek 200914-Apr-10 4:44
tek 200914-Apr-10 4:44 
GeneralRe: Fill a GridView to select data from a GridView Pin
tek 200914-Apr-10 2:07
tek 200914-Apr-10 2:07 
QuestionWhy ASP.NET MVC? Pin
Clement Siby13-Apr-10 22:20
Clement Siby13-Apr-10 22:20 
AnswerRe: Why ASP.NET MVC? Pin
michaelschmitt14-Apr-10 2:03
michaelschmitt14-Apr-10 2:03 
QuestionDateTime Problem Pin
Amit Patel198513-Apr-10 21:59
Amit Patel198513-Apr-10 21:59 
AnswerRe: DateTime Problem Pin
saini arun13-Apr-10 22:10
saini arun13-Apr-10 22:10 
QuestionProblem with Gridview - Shopping cart Pin
EmZan13-Apr-10 21:26
EmZan13-Apr-10 21:26 
Hello,

when i change the quantity value and press update cart buttonn no chages happens and the cart quantities returns to 1 to all!!!

Here's th gridview

http://img15.imageshack.us/img15/2219/cartd.png





The Update Cart Event Handler and related methods


protected void UpdateCartButton_Click(object sender, EventArgs e)
{
    System.Data.DataTable objDT = new System.Data.DataTable();
    objDT = ((System.Data.DataTable)Session["Cart"]).Clone();
    for (int i = 0; i <= ShoppingCartGridView.Rows.Count - 1; i++)
    {
        System.Data.DataRow drow = objDT.NewRow();
        GridViewRow grow = ShoppingCartGridView.Rows[i];
        string TempQ = ((TextBox)grow.FindControl("txtQuantity")).Text;
        UpdateCartQuantities(i,TempQ);
        BindTheGrid(ShoppingCartGridView);
    }
}

public void UpdateCartQuantities(int rowIndex, string TempQ)
{
    System.Data.DataTable CartTableForView =
    (System.Data.DataTable)Session["cart"];
    CartTableForView.Rows[rowIndex]["Quantity"] = TempQ;
    Session["Cart"] = CartTableForView;
}

public void BindTheGrid(GridView TempGrid)
{
     System.Data.DataTable CartTableForView = (System.Data.DataTable)Session["cart"];
     TempGrid.DataSource = CartTableForView;
     TempGrid.DataBind();
}

QuestionHow to get details of users in active directories using LDAP Pin
roshankamath13-Apr-10 20:50
roshankamath13-Apr-10 20:50 
QuestionCheckbox in datagrid Pin
Morgs Morgan13-Apr-10 20:19
Morgs Morgan13-Apr-10 20:19 
AnswerRe: Checkbox in datagrid Pin
Brij13-Apr-10 20:32
mentorBrij13-Apr-10 20:32 
AnswerRe: Checkbox in datagrid Pin
Abhijit Jana13-Apr-10 20:35
professionalAbhijit Jana13-Apr-10 20:35 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan13-Apr-10 21:40
Morgs Morgan13-Apr-10 21:40 
AnswerRe: Checkbox in datagrid Pin
nagendrathecoder13-Apr-10 21:10
nagendrathecoder13-Apr-10 21:10 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan13-Apr-10 21:26
Morgs Morgan13-Apr-10 21:26 
GeneralRe: Checkbox in datagrid Pin
Sandesh M Patil13-Apr-10 22:13
Sandesh M Patil13-Apr-10 22:13 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder13-Apr-10 22:20
nagendrathecoder13-Apr-10 22:20 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder13-Apr-10 22:27
nagendrathecoder13-Apr-10 22:27 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan13-Apr-10 23:42
Morgs Morgan13-Apr-10 23:42 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 0:00
nagendrathecoder14-Apr-10 0:00 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 0:25
Morgs Morgan14-Apr-10 0:25 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 0:33
nagendrathecoder14-Apr-10 0:33 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 1:20
Morgs Morgan14-Apr-10 1:20 
GeneralRe: Checkbox in datagrid Pin
nagendrathecoder14-Apr-10 2:02
nagendrathecoder14-Apr-10 2:02 
GeneralRe: Checkbox in datagrid Pin
Morgs Morgan14-Apr-10 2:30
Morgs Morgan14-Apr-10 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.