To:lbx1979(Love Arsenal) ,能不能说清楚点。

解决方案 »

  1.   

    在代码中手工加事件,它不认识。
    this.lstName.SelectedIndexChanged += new System.EventHandler(this.lstName_SelectedIndexChanged);
    应该有其它方法,我看了,可以在DataList中可以使用Button
        void DataList_ItemCommand(object sender, DataListCommandEventArgs e) 
          {          
             if (((LinkButton)e.CommandSource).CommandName == "select")
                DataList1.SelectedIndex = e.Item.ItemIndex;
             
             BindList();
          }
      

  2.   

    需用摸板:我用的是textbox.<EditItemTemplate>
    <asp:TextBox id="dutypeople" runat="server" Width="88px" Text='<%# DataBinder.Eval(Container.DataItem, "dutypeople") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    -----------------------------------------
    .csTextBox dutypeople=(TextBox)(e.Item.Cells[1].FindControl("dutypeople"));
      

  3.   

    应该是可以触发的啊。
    我估计你是直接引用了dropdownlist的id了,这是不行的。
    你可以将以下代码加到dropdownlist的处理事件中:
    public void index_Change(Object sender,EventArgs e)
      { 
        DropDownList myDropDownList=new DropDownList();
        myDropDownList=(DropDownList)sender;
        ......
       }
      

  4.   

    代码举例:
    <asp:DataListid="myDataList" Runat="server" Width="100%">
    <ItemTemplate>
    <TABLE cellSpacing="2" borderColorDark="#008080" cellPadding="2" width="100%" borderColorLight="#008080" border="0">
    <TR>
    <TD width="15%">名称</TD>
    <TD width="30%">
    <!--绑定数据-->
    <asp:DropDownList Runat="server" ID="lstName" Width="52">
    </asp:DropDownList>
    </TD>
    </TR>
    </TABLE>
    </asp:DataList>想触发lstName_SelectedIndexChanged 事件,或lstName选择改变时,调用一个过程。