<tr> <td colspan= "6" class= "Text_color" > <asp:textbox runat= "ser Ver "id=" txtquery "width=" 20% "></asp:TextBox> <asp:dropdownlist id=" D Dlreportinstance "runat=" Server "></asp:DropDownList> <asp:button Runa t= "Server" id= "Btnquery" cssclass= "Formbutton" text= "search" onclick= "Btnquery_click"/> <a href= "#" onclick= "Showquery ()" > Advanced query </a> Page display number of bars settings <asp:dropdownlist id= "Seletpagenum" Run at= "Server" ></asp:DropDownList> </td> </tr> <TR&G T <TD colspan= "6" > <asp:updatepanel runat= "Server" id= "UpdatePanel2" > <ContentTemplate> <soa:deluxegrid id= "Dgdatasource" runat= "Server" DATASOURC Eid= "DataSource" allowsorting= "true" onsorting= "dgdatasource_sorting" pagesize= ". Aut" ogeneratecolumns= "False" datasourcemaxrow= "0" allowpaging= "True" cssclass= "DataList" Width= "100%" onrowdatabound= "Dgdatasource_rowdatabound" ><%--<Columns> <asp:templatefield headertext= "Operation" visible= "false" sortexpression= "" > <ItemTemplate> <div> <asp:linkbutton runat= "Server" id= "Btnedit" > Edit </asp:LinkButton> <asp:linkbutton runat= "Server" id= "Btndel" > Delete </as P:linkbutton> </div> </ItemTemplate> </asp:TemplateField> </Columns>--%> If this is the case, the controls on the platform do not support
<asp:dropdownlist id= "Seletpagenum" runat= "Server" autopostback= "true" ></asp:DropDownList>
The drop-down box triggers the query button click event, which controls the page's Long value.
<script type= "Text/javascript" > $ ("#seletPageNum"). Change (function () { document.getElementById (" Btnquery "). Click (); }) </script>
protected void Datasource_selecting (object sender, ObjectDataSourceSelectingEventArgs e) {Dgdat Asource.pagesize = Convert.ToInt32 (Seletpagenum.selectedvalue); if (E.executingselectcount = = False) {e.inputparameters["tempid"] = template.id; Wheresqlclausebuilder where = new Wheresqlclausebuilder (); list<keyandvalue> dataitems = new list<keyandvalue> (); if (!hfquerystr.value.isnullorempty ()) Dataitems = Jsonserializerexecute.deserialize<list<keyandv Alue>> (Hfquerystr.value); foreach (var item in dataitems) {var parameter = Template.Config.DataQuery.SearchParame Ters. Find (p = p.parametername = = Item. Key); if (parameter! = null) where. Appenditem (item. Key, TSqlBuilder.Instance.CheckUnicodeQuotationMark (item. Value), "", parameter. FormatString, True); } if (!txtquery.text.isnullorempty ()) {//"normal search" if (Template.Config.DataQ Uery. Defaultwhereclause.contains ("=") = = True) where. Appenditem (Template.Config.DataQuery.DefaultWhereClause.TrimEnd (' = '), txtquery.text); else where. Appenditem (Template.Config.DataQuery.DefaultWhereClause, "%" + txtquery.text + "%", "like"); } if (!string. IsNullOrEmpty (Template.defaultvalue)) {//No value for querying all time data if (Template.isdefault) {if (!ddlreportinstance.selectedvalue.isnullorempty ()) {//"normal search" if (DdlReportInstance.Items.Count > 0) where. Appenditem (Reporttimename, DdlReportInstance.SelectedItem.Text); }} else { where. Appenditem (Reporttimename, DataFormTemplateQueryDataAdapter.Instance.GetReportTimeName (Template.defaultvalue)); }} this.datasource.Condition = where; } }
protected void Btnquery_click (object sender, EventArgs e) { this.dgDataSource.DataBind (); }
JS Event Trigger Event