C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » ASP.NET GridView »

GridView with template columns


Posted Date: 21 Jul 2009    Resource Type: Code Snippets    Category: ASP.NET GridView
Author: mahanteshMember Level: Gold    
Rating: 1 out of 5Points: 5



//grid view with template columns


< asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" AutoGenerateDeleteButton="True"
AutoGenerateEditButton="True"
onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing"
onrowupdating="GridView1_RowUpdating" OnRowCancelingEdit="GridView1_RowCancelingEdit"
PageSize="3" onpageindexchanging="GridView1_PageIndexChanging" >
< Columns >


< asp:TemplateField HeaderText="EmployeeNo" >
< ItemTemplate >
< %#Eval("EmployeeNo")% >
< /ItemTemplate >
< EditItemTemplate >
< asp:TextBox ID="txtEmployeeNo" runat="server" Text=' < %#Eval("EmployeeNo")% > ' > < /asp:TextBox >
< /EditItemTemplate >
< /asp:TemplateField >

< asp:TemplateField HeaderText="Name" >
< ItemTemplate >
< %#Eval("Name")% >
< /ItemTemplate >
< EditItemTemplate >
< asp:TextBox ID="txtName" runat="server" Text=' < %#Eval("Name")% > ' > < /asp:TextBox >
< /EditItemTemplate >
< /asp:TemplateField >

< asp:TemplateField HeaderText="Email" >
< ItemTemplate >
< %#Eval("Email")% >
< /ItemTemplate >
< EditItemTemplate >
< asp:TextBox ID="txtEmail" runat="server" Text=' < %#Eval("Email")% > ' > < /asp:TextBox >
< /EditItemTemplate >
< /asp:TemplateField >


< /Columns >
< /asp:GridView >



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
GridView with template columns  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Get Summary Data in GridView Footer Column
Previous Resource: Gridview with edit,delete operations
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET GridView


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use