Trang Chủ | Diễn Đàn | Thành Viên (Đăng Ký) | Tìm Kiếm | Tutorial Room

RA MẮT THỬ NGHIỆM PHIÊN BẢN MỚI CỦA DIỄN ĐÀN

ASP.NET - Cách Edit ASPxGridView?
Hỏi đáp, trao đổi về ASP.NET.
- Các câu hỏi về ASP xin hãy gởi vào box ASP.
- Các câu hỏi về tìm hosting hỗ trợ ASP/ASP.NET xin hãy gởi vào box Web Hosting.
- Các câu hỏi về tìm chương trình forum, guestbook, hướng dẫn sử dụng, cấu hình các script viết bằng ASP/ASP.NET...xin hãy gởi vào box Web Application.
First page Previous page  (Page 1 )   1   Next page Last page
Cách Edit ASPxGridView?
Member
Member since
00:36 01-10-2007
Posts: 118
Fantasy Points: 456
Rank
sad Posted at 20:36 04-07-2010 Move Move Topic   Pin/Unpin Pin Topic   Lock Lock Topic
Các pác ơi? tớ đang cần dữ liệu nhập vào từ ASPxGridView, nhưng khổ nỗi, tớ tìm mãi mà không biết cách làm sao để edit được các Cell Text trong ASPxGridView.(Edit toàn bộ các cell của ASPxGridView chứ không edit theo row)
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 425 time(s). 2 direct repli(es) and 1 indirect repli(es).
Title Poster
sad Cách Edit ASPxGridView?
 
answer Re: Cách Edit ASPxGridView?
PhamTienSinh
answer Re: Cách Edit ASPxGridView?
quan
Re: Cách Edit ASPxGridView?
Forum Moderator
Member since
11:32 05-01-2002
Posts: 297
Fantasy Points: 4,077
Rank
answer Posted at 08:42 05-07-2010
Reply to Cách Edit ASPxGridView? (thanhlamtinhoc)
thanhlamtinhoc:
Các pác ơi? tớ đang cần dữ liệu nhập vào từ ASPxGridView, nhưng khổ nỗi, tớ tìm mãi mà không biết cách làm sao để edit được các Cell Text trong ASPxGridView.(Edit toàn bộ các cell của ASPxGridView chứ không edit theo row)

GridView của ASP.NET khác xa cho với GridView của Winform và default là không support case này! thực tế cũng chả có application làm vậy cả , không biết mục đích cuối cùng của bạn là làm gì ? do bussiness của ứng dụng yêu cầu như vậy ? hơn nữa việc chỉnh sửa hàng loạt cell trên gridview rồi update sẽ phát sinh thêm việc xử lý Concurrency trên hệ thống đa người dùng ! Nếu muốn cập nhật như vậy nên dùng 1 số ajax control thay cho GridView

http://sourceforge.net/projects/sigmagrid/
This post has been edited 1 time(s). Last edited by PhamTienSinh on 08:47 05-07-2010.
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 409 time(s). 0 direct repli(es) and 0 indirect repli(es).
Re: Cách Edit ASPxGridView?
Member
Member since
19:30 12-02-2002
Posts: 388
Fantasy Points: 6,469
Rank
answer Posted at 05:39 09-07-2010
Reply to Cách Edit ASPxGridView? (thanhlamtinhoc)
Add a Command column mà trong đó có Edit command link. Khi click Edit, GV sẽ tự động chuyển sang Edit mode, biến các input fields trong row thành textbox by default. Sau khi edit thì bấm Update link trong Command column để lưu row đó vào database.

http://msdn.microsoft.c...us/library/ms972948.aspx
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 360 time(s). 1 direct repli(es) and 0 indirect repli(es).
Title Poster
answer Re: Cách Edit ASPxGridView?
 
answer Re: Cách Edit ASPxGridView?
quan
Re: Cách Edit ASPxGridView?
Member
Member since
19:30 12-02-2002
Posts: 388
Fantasy Points: 6,469
Rank
answer Posted at 17:53 09-07-2010
Reply to Re: Cách Edit ASPxGridView? (quan)
Post xong mới thấy đòi hỏi chót. Muốn mọi row của GV trong Edit mode, cần override CreateRow method của GV.

Protected Overrides Function CreateRow(ByVal rowIndex As Integer, ByVal dataSourceIndex As Integer, ByVal rowType As DataControlRowType, ByVal rowState As DataControlRowState) As GridViewRow
        Return MyBase.CreateRow(rowIndex, dataSourceIndex, rowType, rowState Or DataControlRowState.Edit)
        'Return MyBase.CreateRow(rowIndex, dataSourceIndex, rowType, rowState) 'Default
    End Function
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 347 time(s). 0 direct repli(es) and 0 indirect repli(es).
First page Previous page  (Page 1 )   1   Next page Last page

Permissions: Create Topic: No  |  Reply Topic: No  |  Attach File: No  |  Make Poll: No

Vietnamese Keyboard: AUTO TELEX VNI VIQR VIQR* OFF

Go top || Print page ||

All logos, trademarks and graphics artwork in this site are property of their respective owners.
Opinions expressed in articles within this site are those of their owners and may not reflect the opinion of TXBB.

TXBB: Home - Disclaimer - Help - Contact
Copyright (C) 2000-2006 TXBB. All rights reserved.

TreXanh Bulletin Board v2.0 (Build: #332 Nov 21, 2006)

DEBUG INFORMATION
Execution 0.331s - SQL used 5s - Concurrent process(es) 0