Subscribe: Paul Sheriff's Blog for the Real World
http://weblogs.asp.net/psheriff/rss.aspx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
add  bootstrap  btn  button  buttons  check boxes  check  create  form group  label  panel  radio button  radio buttons  radio 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Paul Sheriff's Blog for the Real World

Paul Sheriff's Blog for the Real World



This blog is to share my tips and tricks garnered over 25+ years in the IT industry



 



Manipulating HTML Tables – Part 5 (Editing Rows using an ID)

Tue, 03 Mar 2015 08:02:13 GMT

While we have been concentrating on just working with client-side code, at some point you are going to have to send the data back to the server. In addition, you will most likely get data from a server as well. Most of us assign a primary key (unique number) to each row of data. This ‘ID’ can be used to identify each row of data within the table. In this blog post you will see how you might use a primary key when manipulating data within a table. NOTE: You should probably go back and read the previous blog posts in order to see what we are doing with tables. The HTML The HTML is exactly like that shown in my last blog post. I am presenting it here just so you can see it in its entirety.
 

Add Row to Table

 
   
                                                                                                           
EditFirst NameLast NameEmailDelete
   
 
 
   
     
       
          Person Information        
       
          
                                  
         
                       



Manipulating HTML Tables – Part 4 (Editing Rows)

Tue, 24 Feb 2015 15:17:45 GMT

You have learned how to add rows and delete rows from an HTML table in my last 3 blog posts. Now, let’s turn our attention to editing rows in an HTML table. Just like you added a Delete button to each row in your table, you will now add an Edit button as well (Figure 1). Figure 1: Add an edit button to allow a user to edit a single row in the table The HTML The HTML is similar to that shown in my last blog post, with another added to allow for a column where you will place an ‘Edit’ button. I have highlighted the change in bold in the code below.  
 

Edit Row in a Table

 
   
                                                                                                           
EditFirst NameLast NameEmailDelete
   
 
 
   
     
       
          Person Information        
       
         
                                 
         
                           &nb[...]



Manipulating HTML Tables – Part 3 (Deleting Rows)

Tue, 24 Feb 2015 15:16:40 GMT

My last two blog posts showed you how to add rows to an HTML table. Now, let’s learn how to delete a row from a table. In order to accomplish this you will need to add a ‘Delete’ button to each row of the table. The HTML The HTML for this sample is similar to my last blog post, with the addition of a new to allow for a column in which you place a ‘Delete’ button. I have highlighted the change in bold in the code below. Figure 1: Add a delete button to allow a user to delete a row from the table  
 

Delete Row in Table

 
   
                                                                                               
First NameLast NameEmailDelete
   
 
 
   
     
       
          Person Information        
       
         
                                 
         
                                 
         



Manipulating HTML Tables – Part 2 (Adding Rows)

Tue, 24 Feb 2015 15:14:45 GMT

In my last blog post, I showed how to add a hard-coded row to a table using jQuery and JavaScript. Now, let’s make this a little more dynamic by gathering input from our user and adding that data to our table. The HTML In addition to the table shown in my last blog post, you now are adding three input fields for the user to input the data to add to the table. The user will input a first name, last name and email address (Figure 1) which will then be added to the table. Again, I am using bootstrap, but is not a requirement. Figure 1: Add rows to a table using user input
 

Add Row to Table

 
   
                                                                                   
First NameLast NameEmail
   
 
 
   
     
       
          Person Information        
       
         
                                 
         
                                 
         
  &n[...]



Manipulating HTML Tables – Part 1 (Adding Rows)

Tue, 24 Feb 2015 15:13:30 GMT

Users continue to demand faster and more dynamic user experiences in web applications. One way to accomplish this is to start doing more with JavaScript and jQuery, thereby eliminating or reducing post-backs to the server. In this first blog post of many, I will show you how to work with HTML tables. In this first blog you will learn how to add rows to a table using JavaScript and jQuery. The HTML For these samples, I am using Bootstrap in order to have a nice appearance for my web page. However, Bootstrap is not required for these samples. The HTML I am using creates an empty table with just a for the headers of each column in the table. Note that there is no . We will check for that in our jQuery and add one if necessary. Figure 1: Adding rows to a table using jQuery  
    

Add Row to Table (Hard-Coded)

    
      
                                                                                                              
First NameLast NameEmail
      
    
 
  Figure 2: HTML Table Markup Adding a Row Within the Add Pop-Up Message Add a pop-up message by creating a
with a