日期:2014-05-17  浏览次数:20581 次

GridView里的DropDownList在 RowCommand事件怎么写
在三层下的
C# code

  <asp:GridView ID="gvMain" runat="server" AutoGenerateColumns="False" 
                          CellPadding="4" ForeColor="#333333" GridLines="None" Width="99%" 
                          onrowdatabound="gvMain_RowDataBound" Font-Size="Small" 
                          DataKeyNames="vcDepartID" onrowcommand="gvMain_RowCommand"   >
                          <AlternatingRowStyle BackColor="White" />
                          <Columns>
                              <asp:TemplateField HeaderText="部门">
                                  <ItemTemplate>
                                      <asp:Label ID="Label1" runat="server" Width="45px"></asp:Label>
                                  </ItemTemplate>
                              </asp:TemplateField>
                              <asp:BoundField DataField="vcCadreName" HeaderText="姓名" 
                                  SortExpression="vcCadreName"> <ItemStyle Width="50px" /></asp:BoundField >
                              <asp:TemplateField HeaderText="德25%(思想政治、职业道德、社会伦理道德)">
                                  <ItemTemplate>
                                      <asp:DropDownList ID="ddlDe" runat="server" 
                                          onselectedindexchanged="ddlDe_SelectedIndexChanged" 
                                          DataValueField="IEvaluateID" DataTextField="vcEvaluates" 
                                          AutoPostBack="True">
                                      </asp:DropDownList>            
                                  </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="能25%(政策理论水平、业务工作能力、策划协调能力、开拓创新能力、驾驭全局能力)">
                                  <ItemTemplate>
                                      <asp:DropDownList ID="ddlNeng" runat="server"   AutoPostBack="True"
                                      onselectedindexchanged="ddlNeng_SelectedIndexChanged"
                                       DataValueField="IEvaluateID" DataTextField="vcEvaluates">
                                      </asp:DropDownList>                    
                                  </ItemTemplate>
                                     <ItemStyle HorizontalAlign="Center" />
                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="勤10%(出勤情况、工作表现)">
                                  <ItemTemplate>
                                      <asp:DropDownList ID="ddlQin" runat="server"    AutoPostBack="True"
                                       onselectedindexchanged="ddlQin_SelectedIndexChanged"
                                        DataValueField="IEvaluateID" DataTextField="vcEvaluates">
                                      </asp:DropDownList>          
                                  </ItemTemplate>
                                  <ItemStyle HorizontalAlign="Center" />
                              </asp:TemplateField>
                              <asp:TemplateField HeaderText="绩30%(工作数量、工作质量、工作效率及效益)">