从Radgrid中在GridCommandtem中设置文本标签

问题描述

我可以在GridCommandItem中从Radgrid调用并设置Label文本吗?

在radgrid之前和之后的radgrid中,我的代码都位于aspx中。

var UID = {
    _current: 0,getNew: function(){
        this._current++;
        return this._current;
    }
};

HTMLElement.prototype.pseudoStyle = function(element,prop,value){
    var _this = this;
    var _sheetId = "pseudoStyles";
    var _head = document.head || document.getElementsByTagName('head')[0];
    var _sheet = document.getElementById(_sheetId) || document.createElement('style');
    _sheet.id = _sheetId;
    var className = "pseudoStyle" + UID.getNew();
    
    _this.className +=  " "+className; 
    
    _sheet.innerHTML += "\n."+className+":"+element+"{"+prop+":"+value+"}";
    _head.appendChild(_sheet);
    return this;
};

$(document).ready(function(){ $("#example").on('click',function(){
     window.location = "http://www.google.com/";});
});
var div = document.getElementById("example");
div.pseudoStyle("before","color","#ff0000");

如何在下面的GridCommandItem中调用

<div class="filter">
    <fieldset>
        <legend>Control Panel</legend>
            <div class="form-row">
                <asp:Button ID="BtnData" Text="Data" runat="server" OnClick="BtnData" />
            </div>
            <div class="form-row">
                <asp:Label ID="LabelOut" runat="server"></asp:Label>
            </div>
    </fieldset>
</div>

感谢您的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)