Creating Columns At Runtime

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2008
Posts: 75
Reputation: mansi sharma is an unknown quantity at this point 
Solved Threads: 0
mansi sharma mansi sharma is offline Offline
Junior Poster in Training

Creating Columns At Runtime

 
0
  #1
Aug 1st, 2009
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 -

  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. }
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Creating Columns At Runtime

 
0
  #2
Aug 3rd, 2009
Sorry, wrong forum. Post your question to DaniWeb's C# forum.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,187
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Creating Columns At Runtime

 
0
  #3
Aug 3rd, 2009
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.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC