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.
| Cách Edit ASPxGridView? |
|
Member
Member since
00:36 01-10-2007
Posts:
118
Fantasy Points:
456
|
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)
This post has been viewed
425
time(s).
2 direct repli(es)
and
1 indirect repli(es).
|
| Re: Cách Edit ASPxGridView? |
|
Forum Moderator
Member since
11:32 05-01-2002
Posts:
297
Fantasy Points:
4,077
|
 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.
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
|
 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
This post has been viewed
360
time(s).
1 direct repli(es)
and
0 indirect repli(es).
|
Title
|
Poster
|
 |
 |
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
|
 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
This post has been viewed
347
time(s).
0 direct repli(es)
and
0 indirect repli(es).
|
|
Permissions:
Create Topic:
No
|
Reply Topic:
No
|
Attach File:
No
|
Make Poll:
No
|