Đang chuẩn bị liên kết để tải về tài liệu:
Hyperlink from a Row in the Data Grid to a Detail Page

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Làm thế nào để hiển thị thông tin chi tiết trong một trang riêng biệt từ một điều khiển DataGrid? Kỹ thuật Một trong những loại cột mà bạn có thể sử dụng trong lưới dữ liệu là cột HyperLink. | 5.8 Hyperlink from a Row in the Data Grid to a Detail Page Often I need to zero in and display data based on a record in the DataGrid control. How do I display detail information in a separate page from a DataGrid control Technique One of the types of columns that you can use in the data grid is the HyperLink column. This column makes it fairly easy to link pages based on data. To see how the HyperLink type column is used in this How-To take a look at Figure 5.14. Figure 5.14. No code is required for link pages based on data. By your specifying the URL Field to be ProductID and URL Format String to be wfrmHowTo5_8b.aspx ID 0 the data grid automatically calls the wfrmHowTo5_8b.aspx and passes the ProductID to the form when you click on a product. Steps Open and run the Visual Basic .NET-Chapter 5 solution. From the main page click on the hyperlink with the caption How-To 5.8 Hyperlink From a Row in the Data Grid to a Detail Page. You then see all the products loaded into a data grid. Notice that the products are actually hyperlinks see Figure 5.15 . Figure 5.15. These hyperlinks require no code to call a detail page. When you click on a product another page is displayed with detail information supplied see Figure 5.16 . 1. Create a Web Form. Then place the controls in Table 5.12 and Figure 5.15 with the following properties set. Table 5.12. Property Settings for the Controls Used on the First Page of This How-To Object Property Setting OleDbDataAdapter ID odaProducts SelectCommand SELECT ProductID ProductName FROM Products DataSet ID dsProducts DataGrid ID dgProducts DataSource dsProducts DataKeyField ProductID DataMember Products HyperLink ID hplReturnToMain NavigateURL wfrmMain.aspx 2. Right-click on the DataGrid control and choose Property Builder. Click on the Columns tab and set the properties as displayed in Figure 5.14. Be sure to note the name of the form you are calling in the URL Format String so that you can name it the same in step 4. 3. Add the code in

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.