以下是我写的一个DropDownList可以帮定多个列的一个用户控件 <TABLE id="Table6" cellSpacing="0" cellPadding="0" border="0"> <TBODY> <TR> <TD style="DISPLAY: none" width="1"><asp:textbox id="tbValue" runat="server" Width="10px">0</asp:textbox></TD> <TD id="TD1" width="400" runat="server"><asp:textbox id="tbDes" runat="server" Width="100%" ReadOnly="True" CssClass="noRightBorder"></asp:textbox></TD> <TD> <DIV style="BORDER-RIGHT: thin inset; BORDER-TOP: thin inset; WIDTH: 18px; POSITION: relative; HEIGHT: 18px" ms_positioning="GridLayout"> <DIV onmouseup="this.className='link_arrow0'" class='link_arrow0' onselectstart="return false" onmousedown="this.className='link_arrow1'" style="POSITION: relative" onclick="show('<%=DG.ClientID%>','<%=DataGrid1.ClientID%>','<%=tbValue.ClientID%>');">6</DIV> </DIV> </TD> </TR> <TR> <TD style="DISPLAY: none" width="1"></TD> <TD id="TD2" width="400" runat="server"> <DIV id="DG" onblur="hide();" style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; DISPLAY: none; Z-INDEX: 200; OVERFLOW: auto; WIDTH: 100%; BORDER-BOTTOM: gray 1px solid; POSITION: absolute; HEIGHT: 175px" onmouseout="lostFocus();" runat="server" ms_positioning="GridLayout"><iframe style="FILTER: progid: DXImageTransform.Microsoft.Alpha(style=0,opacity=100); VISIBILITY: inherit" frameBorder=0 width="<%=DataGrid1.width%>" height="<%=DataGrid1.height%>" > </iframe> <asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" Width="750px" Height="200px" ShowHeader="False" BorderWidth="1px" BorderColor="Gainsboro"></asp:datagrid></DIV> </TD> <td></td> </TR> </TBODY></TABLE>> Imports System.Data.SqlClient 相关文章: