Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

config GridView so row shows in edit mode

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John A Grandy - 17 Feb 2006 20:38 GMT
I'm not using SqlDataSource or ObjectDataSource.  I'm handling events ,
similar to approach commonly used in 1.1. DataGrid.

My question is : How do I configure a GridView's edit mode row format ?

Here is my aspx  :

<asp:GridView ID="gvTasks" runat="server" AllowSorting="true"
BackColor="Aqua"

Caption="Tasks" DataKeyNames="TaskID" EnableViewState="true"
ForeColor="Black"

EnableSortingAndPagingCallbacks="false"

AutoGenerateDeleteButton="true" AutoGenerateEditButton="true"

OnRowEditing="gvTasks_RowEditing"
OnRowCancelingEdit="gvTasks_RowCancelingEdit"

OnRowUpdating="gvTasks_RowUpdating" OnRowUpdated="gvTasks_RowUpdated"

OnRowDeleting="gvTasks_RowDeleting" OnRowDeleted="gvTasks_RowDeleted"

OnRowCreated="gvTasks_RowCreated"

<Columns>

<asp:BoundField DataField="TaskID" Visible="false" />

<asp:BoundField DataField="TaskDate" ShowHeader="true" HeaderText="Date" />

<asp:BoundField DataField="TaskDescription" ShowHeader="true"
HeaderText="Description" />

<asp:BoundField DataField="TaskTimeInHours" DataFormatString="0.0"
ShowHeader="true" HeaderText="Hours" />

</Columns>

</asp:GridView>
Andrew Robinson - 17 Feb 2006 21:24 GMT
John,

Not exactly clear on what you mean by Edit Mode Row Format?

If you are not using a Sql Data Source or and ODS, you need to manually bind
a dataTable or collection to the GridView. To put the grid into Edit mode,
set the EditIndex to the row you want to edit and rebind the control. This
is typically done in the GridView_RowEditing even using the NewEditIndex
event argument.

If you are looking for something else, please provide a bit more info.

Hope this is of some help.

Signature

Andrew Robinson
http://blog.binaryocean.com

> I'm not using SqlDataSource or ObjectDataSource.  I'm handling events ,
> similar to approach commonly used in 1.1. DataGrid.
[quoted text clipped - 38 lines]
>
> </asp:GridView>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.