SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 122 | Next

Joydip Kanjilal

"ASP.NET Data Presentation Controls Essentials"


HeaderText="Joining Date"
DataFormatString="{0:MM-dd-yyyy}"/>
Appending Data Using the DataGrid Control
A blank row is displayed just beneath the last record of the page in view, as shown
in the screenshot earlier, in this chapter. You can type in your required data and
then click on the Add link to append the record in the employee table. Refer to the
following screenshot:
A new record is inserted in the employee table. The following screenshot displays
the newly added record:
Working with the DataGrid Control in ASP.NET
[ 128 ]
When you click on the Add LinkButton in the user interface, the onAdd()
event handler is triggered. This has already been set in the .aspx file using the
following statement:
OnItemCommand="onAdd"
The command name for the Add LinkButton has already been specified using the
following statement in the .aspx file.
runat="server" />
Next, the FindControl() method is called to retrieve the control instances within
the DataGrid control. Here is the code that we will use the FindControl() method,
in our code behind file, to retrieve the reference to the controls txtEmpName_Add and
txtBasic_Add that are contained within the DataGrid control.


Pages:
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6