If e.Row.RowType = DataControlRowType.Header Then For Each cell As DataControlFieldCell In e.Row.Cells cell.Attributes.Add("onclick", "javascript: GetHeaderText('" + cell.Text + "')") ' Next End If
function GetHeaderText(txt) {alert(txt);
<asp:ScriptManager ID="asm" runat="server" /> <asp:button id="ClientButton" runat="server" text="Button" /> <ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlId="ClientButton" PopupControlID="ModalPanel" OkControlID="OKButton" BackgroundCssClass="modalBackground" /> <asp:Panel ID="ModalPanel" runat="server" Width="500px" BackColor="#3366FF" BorderColor="#FF33CC" BorderStyle="Dotted" CssClass="modapopup"> ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers.<br /> <asp:Button ID="OKButton" runat="server" Text="Close" /> </asp:Panel>
Nrow("PU") = CDbl(TxtVals(3))
dt.Columns.Add("PU", GetType(Double))
Dim sum As Object sum = dt.Compute("Sum(PU)", "") MsgBox(sum.ToString)