我有一個query
它顯示gridview
。但它與來自aspx的SR.NO沒有任何關係。按順序顯示gridview行按照desc
現在我想要的是。我想在sr.no
的基礎上顯示gridview
desc order。
查詢低於:
OracleCommand cmd = new OracleCommand(
"SELECT pn.project_id AS project_id, pn.property_name, pn.building, pn.building_id AS building_id, " +
"cd.flat_id AS flat_id, ab.flat_status, ab.COMMENTS, to_char(ab.CREATION_DATE, 'dd/MM/yyyy') AS CREATION_DATE " +
"FROM xxcus.xxacl_pn_projbuild_v pn INNER JOIN xxacl_pn_flat_status_his ab ON pn.project_id = ab.project_id " +
"AND pn.building_id = ab.building_id INNER JOIN xxacl_pn_flat_det_v cd " +
"ON cd.flat_id = ab.flat_id where ab.delete_flag = 'N' Order by pn.property_name", ObjPriCon);
和GridView的ASPX是: -
<cc1:Grid ID="GrdBookingStatus" runat="server" FolderStyle="../../Styles/Grid/style_12"
AutoGenerateColumns="false" AllowColumnResizing="true" Width="90%" ShowFooter="false"
ShowHeader="true">
<Columns>
<cc1:Column ID="Column1" DataField="" ReadOnly="true" HeaderText="Sr.No" Width="5%"
runat="server" Wrap="true">
<TemplateSettings TemplateId="tplNumbering" />
</cc1:Column>
<cc1:Column ID="Column2" DataField="PROPERTY_NAME" HeaderText="Project Name" runat="server"
Width="16%" Wrap="true">
</cc1:Column>
<cc1:Column ID="Column3" DataField="BUILDING" HeaderText="Building Name" runat="server"
Width="13%" Wrap="true">
</cc1:Column>
<cc1:Column ID="Column4" DataField="FLAT_ID" HeaderText="Unit No" runat="server"
Width="5%" Wrap="true">
</cc1:Column>
<cc1:Column ID="Column5" DataField="FLAT_STATUS" HeaderText="Unit Status" runat="server"
Width="15%" Wrap="true">
</cc1:Column>
<cc1:Column ID="Column7" DataField="CREATION_DATE" HeaderText="Date" runat="server"
Width="10%" Wrap="true">
</cc1:Column>
<cc1:Column ID="Column6" DataField="COMMENTS" HeaderText="Comments" runat="server"
Width="26%" Wrap="true">
</cc1:Column>
</Columns>
<Templates>
<cc1:GridTemplate runat="server" ID="tplNumbering">
<Template>
<b>
<%# (Container.RecordIndex + 1) %></b>
</Template>
</cc1:GridTemplate>
</Templates>
</cc1:Grid>
如何通過SR.NO
遞減
您的數據源沒有SNo – Imad
@匿名:我在代碼隱藏中綁定,它不包含'Sr.No' – BNN
默認情況下,哪個訂單獲取數據?任何列? – Imad