是不是.net 2.0 把 e.Item這個屬性去掉了!~~?我打e.沒有彈出item這個遷項的?

解决方案 »

  1.   

    那是不是datagrid也可 以用的?GridVIEW應用什麽代替?
      

  2.   

    string name = ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.Trim();
    gridview.Row[e.RowIndex].cell[3].Text 
      

  3.   

    GridView在RowDataBind事件中用
    e.Row.Cells[列号].Text
      

  4.   


    能寫清楚點嗎??我好像在gridview中沒有找到rowdatabind事件吖
      

  5.   

    GridView的RowDataBound事件!
      

  6.   

    <gridview onRowDataBound="gv_RowDataBound">
    </gridview>?
      

  7.   

    因為我后面的事件那里有if (e.cmmandName=="Bt_Buy")而前面用的中onRowdataBound事件的話  后面就要用GridViewRowEventArgs e  這樣的話,不是與委托不匹配嗎
      

  8.   

    你想在RowCommand事件下取GridView某行某列的值?
    则应该是
    string a=GridView1.Rows[行号].Cells[列号].Text;
      

  9.   

    "Bt_Buy"  我是的gridview里的一個<asp:ButtonField CommandName="Bt_Buy" Text="訂購">
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:ButtonField>那行那列是不固定的
      

  10.   

    所以我想,之前那里應該用onRowCmmand事件的.但是用這個的話,后面的就不能用 e.Rows了
      

  11.   

    那個問題我解決了!~~
    用的是RowCmmand事件
    先 int index = Convert.ToInt32(e.CommandArgument);
    但e.Row這里就改為GV_1.Rows[index] 
    接下來看一下這個吧                string sOrigPrice = GV_Books.Rows[index].Cells[5].Text;
                    string sSellPrice = GV_Books.Rows[index].Cells[6].Text;
                    rowNew["OrigPrice"] = Convert.ToDecimal(sOrigPrice.Substring(1,sOrigPrice.Length-1));
                    rowNew["SellPrice"] = Convert.ToDecimal(sSellPrice.Substring(1,sSellPrice.Length-1));好像轉換不了