Share: DataGrid Footer Dow Empty Button

xiaoxiao2021-03-05  21

DataGrid is generally displayed, deleted, and modified for data. Recently, however, is the function of "Add Record" and "Search" in the FOOTER row. The specific approach is: In the FOOTER line, add INSERT / SEARCH 2 button, CommandName is set to "INSERT" and "Search"; other columns are set to "INSERT" and "Search"; other columns . Click the Insert button, in the DataGrid's itemCommand event, then determine that commandName is "Insert", add a record, if "Search", restroom data.

For convenience, you can also add a RESET button to the FOOTER row to empty the value of the FOOTER line. In order to facilitate the user, do not perform Postback, but only use JavaScript to empty on the client. The practice is as follows:

I. Add such image control in the FOOTER line:

Two, aspx Javascript page references the following functions: function fcnAthosIbtResetClick (ibtReset, arrIds) {var strResetId = new String (ibtReset.id); var i = strResetId.lastIndexOf ( "_"); var strRow = strResetId.substring (0, i 1); for (i = 0; I

转载请注明原文地址:https://www.9cbs.com/read-38812.html

New Post(0)