944,008 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 465
  • C# RSS
Aug 1st, 2009
0

Creating Columns At Runtime

Expand Post »
I m creating columns at runtime,I want to know how add delete & edit buttons in each row & to create them at runtime..Foll code create columns at runtime -

C# Syntax (Toggle Plain Text)
  1. protected void Page_Load(object sender, EventArgs e)
  2. {
  3. try
  4. {
  5. if (!IsPostBack)
  6. {
  7. DataTable dt = new DataTable();
  8. dt.Columns.Add("SNo");
  9. dt.Columns.Add("First Name");
  10. dt.Columns.Add("Last Name");
  11. dt.Columns.Add("EMail");
  12. dt.Columns.Add("Address");
  13. dt.Columns.Add("Phone No");
  14.  
  15. }
  16. }
  17.  
  18. catch (Exception ex)
  19. {
  20. Label1.Text = ex.Message.ToString();
  21. }
  22.  
  23. }
Similar Threads
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
mansi sharma is offline Offline
75 posts
since Apr 2008
Aug 3rd, 2009
0

Re: Creating Columns At Runtime

Sorry, wrong forum. Post your question to DaniWeb's C# forum.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008
Aug 3rd, 2009
0

Re: Creating Columns At Runtime

Do you really want the buttons in the row? It seems like you should have buttons on the page near the grid to do customizations as you don't want to repeat these buttons for every row on the grid.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Upload PDF, Zip, DOC, any file type to MS SQL DB
Next Thread in C# Forum Timeline: Text file encoding





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC