powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Странно работает Pager в ListView
1 сообщений из 1, страница 1 из 1
Странно работает Pager в ListView
    #38658889
Здравствуйте! Помогите решить проблему с пейджером в листвью

Код ListView

Код: html
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
<asp:ListView ID="CartView" runat="server" OnSelectedIndexChanged="CartView_SelectedIndexChanged" style="border-style: solid; border-width: 1px; padding: 1px 4px" >
          <LayoutTemplate>
            <table runat="server" class="tableContent" id="itemPlaceholder">
            </table>
        <asp:DataPager runat="server" ID="DataPager" PageSize="10">
            <Fields>
              <asp:NumericPagerField ButtonCount="5" PreviousPageText="<<" NextPageText=">>" />
            </Fields>
          </asp:DataPager>
            </LayoutTemplate>
         <ItemTemplate>
           <table id="tbl" itemid="tbl" runat="server" class="tableContent" >
               <tr runat="server" >
                   <td>
                       <p>
                    Пользователь : <%# Eval("EmployeeName") %>
                      </p>
                    
 
                     Системный блок: <%# Eval("DictionaryName") %>
                    

                   </td>
               </tr>
               <tr>
                   <td style="font:16px 500; color:red; ">
                      Принтер: <%# Eval("printer") %> Картридж: <%# Eval("DictionaryCartID") %> Количество:
                   </td>
               </tr>
           </table>
        </ItemTemplate>
    </asp:ListView>



Заполняется в Page_Load

Код: c#
1.
2.
3.
4.
5.
6.
7.
8.
9.
string ConnStr = ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString;
        ds = new SqlDataSource(ConnStr, "Select Comp.ID, Comp.DictionaryName, Equipment.EquipmentId, Equipment.ParameterPrinterID, Equipment.ParameterCompID, Equipment.EmployeeID, ParameterPrinters.ParameterId, ParameterPrinters.DictionaryName as printer, " +
       "ParameterPrinters.DictionaryCartID, Employee.EmployeeId, Employee.EmployeeName " +
       "From Comp, Equipment, ParameterPrinters, Employee " +
       "where ParameterPrinters.ParameterId = Equipment.ParameterPrinterID and Equipment.ParameterCompID = Comp.ID and Employee.EmployeeId = Equipment.EmployeeID");
        ds.DataBind();

        CartView.DataSource = ds;
        CartView.DataBind();



Странность пейджера состоит в том что он перелистывает страницы только со второго щелчка по номеру страницы.
...
Рейтинг: 0 / 0
1 сообщений из 1, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Странно работает Pager в ListView
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]