我有一个简单的网页,将在一个超webgrid显示数据。页面在开始时运行良好,直到我更改下拉列表的值。在拉下列表中选择新值后,其他列将不显示。下面是我的代码在超webgrid ASP。净:
<igtbl:UltraGridBand AllowColSizing="Free">
<Columns>
<igtbl:UltraGridColumn BaseColumnName="CONTAINERID" IsBound="True" Key="CONTAINERID"
Hidden="true">
<Header Caption="CONTAINERID">
<RowLayoutColumnInfo OriginX="1" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="1" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="WIPLOTHISTORYID" IsBound="True" Key="WIPLOTHISTORYID"
Hidden="true">
<Header Caption="WIPLOTHISTORYID">
<RowLayoutColumnInfo OriginX="1" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="1" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="WIPTRACKINGGROUPKEYID" IsBound="True" Key="WIPTRACKINGGROUPKEYID"
Hidden="true">
<Header Caption="WIPTRACKINGGROUPKEYID">
<RowLayoutColumnInfo OriginX="2" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="2" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="SPECID" IsBound="True" Key="SPECID" Hidden="true">
<Header Caption="SPECID">
<RowLayoutColumnInfo OriginX="3" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="3" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="insertionnumber" Key="insertionnumber"
Width="65px">
<Header Caption="Insertion #">
<RowLayoutColumnInfo OriginX="4" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="4" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="insertionreasonname" Key="insertionreasonname"
Width="150px">
<Header Caption="Insertion Reason">
<RowLayoutColumnInfo OriginX="5" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="5" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="Operation" IsBound="True" Key="Operation"
Width="200px" Hidden="True">
<Header>
<RowLayoutColumnInfo OriginX="6" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="6" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="Transaction Information" IsBound="True" Key="Transaction Information"
Width="200px">
<Header Caption="Transaction Information">
<RowLayoutColumnInfo OriginX="7" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="7" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:TemplatedColumn Width="280px">
<Header Caption="Details">
<RowLayoutColumnInfo OriginX="8"></RowLayoutColumnInfo>
</Header>
<CellTemplate>
<table style="vertical-align: middle; width: 100%">
<tr>
<td valign="middle" style="width: 75%">
<div>
<%# Eval("Details").ToString().Replace("break", "<br/>") %></div>
</td>
<td valign="middle" style="width: 25%">
<div style="text-decoration: Underline">
<%# Eval("Values").ToString().Replace("break", "<br/>")%></div>
</td>
</tr>
</table>
</CellTemplate>
<Footer>
<RowLayoutColumnInfo OriginX="8"></RowLayoutColumnInfo>
</Footer>
</igtbl:TemplatedColumn>
<igtbl:UltraGridColumn BaseColumnName="Status" Key="Status" Hidden="true">
<Header Caption="Lot Status">
<RowLayoutColumnInfo OriginX="9" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="9" />
</Footer>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="Date" DataType="System.DateTime" IsBound="True"
Width="150px" Key="Date">
<Header Caption="Date">
<RowLayoutColumnInfo OriginX="10" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="7" />
</Footer>
</igtbl:UltraGridColumn>
</Columns>
<AddNewRow Visible="NotSet" View="NotSet">
</AddNewRow>
</igtbl:UltraGridBand>
我在c#上的代码是:
ddlInsertion.Items.Clear();
sqldsInsertionCount.SelectCommand = "SELECT containerid , w.insertionnumber FROM (SELECT wipdata.containerid, wipdata.insertionnumber FROM (SELECT DISTINCT c.containerid , wl.insertionnumber FROM container c JOIN a_wiplot wl ON c.containerid = wl.containerid JOIN a_wiplotdetails wld ON wld.wiplotid = wl.wiplotid JOIN a_wiplotdetailsdata wldd ON wldd.wiplotdetailsid = wld.wiplotdetailsid WHERE c.containername = '" + txtLot.Text + "' AND wl.wiptrackinggroupkeyid = '" + wipkey.ToString() + "' AND wldd.iswaferdata = 0 AND wldd.wipdatanamename != 'WAFER SCRIBE ID')wipdata GROUP BY wipdata.containerid , wipdata.insertionnumber UNION ALL SELECT wipdata.containerid , wipdata.insertionnumber FROM (SELECT DISTINCT c.containerid , wl.insertionnumber FROM CONTAINER c JOIN a_wiplothistory wl ON c.containerid = wl.containerid JOIN a_wiplotdetailshistory wld ON wld.wiplothistoryid = wl.wiplothistoryid JOIN a_wiplotdetailsdatahistory wldd ON wldd.wiplotdetailshistoryid = wld.wiplotdetailshistoryid WHERE c.containername = '" + txtLot.Text + "' AND wl.wiptrackinggroupkeyid = '" + wipkey.ToString() + "' AND wldd.iswaferdata = 0 AND wldd.wipdatanamename != 'WAFER SCRIBE ID' )wipdata GROUP BY wipdata.containerid , wipdata.insertionnumber)w GROUP BY w.containerid , w.insertionnumber ORDER BY w.insertionnumber DESC";
ddlInsertion.Items.Insert(0, new System.Web.UI.WebControls.ListItem("%", "%"));
uwgDataCollection.Clear();
uwgDataCollection.DataSourceID = whdsDataCollection.ID;
uwgDataCollection.DataBind();
uwgDataCollection.ExpandAll();
CustomizeColumns(txtSpec.Text.Substring(0, 4));
ExpirePageCache();
再次感谢大家的帮助:)
结果是. clear()语句删除了网格上的所有带。我试着把它取下来后,一切都很顺利。感谢alhalama的评论。我欠你啤酒,伙计