网格的单元格可以使用弹窗SM8016
namespace SM8016CPDLMXQD{
public class SM8016CPDLMXQD : ISuwfBus
{
private SlnSuwfPage _page;
public void Initial(SlnSuwfPage page)
{
_page = page;
BindButtonEvent("btnCPDLMXQD", new EventHandler(BtnCPDLMXQD_Click), "");
}
#region 绑定控件事件 BindButtonEvent
private void BindButtonEvent(string strBtnName, EventHandler ev, string strText)
{
Control crl = _page.FindControl(strBtnName);
if (crl == null)
{
return;
}
Button btn = (Button)crl;
if (btn == null)
{
return;
}
btn.Click += ev;
if (strText != "")
btn.Attributes.Add("onclick", "javascript:if(!confirm('" + strText + "?')){return false;}");
}
#endregion
#region BtnCPDLMXQD_Click
private void BtnCPDLMXQD_Click(object sender, EventArgs e)
{
#region
int rowNum = -1;
string ID = _page.GetControlValue("val_ID2");
if (string.IsNullOrEmpty(ID))
{
_page.ClientScript.RegisterStartupScript(_page.GetType(), "ID2", SlnString.ScriptAlertMessage("ID2不为空"));
return;
}
#region
for (int j = 0; j < _page.GridData.Rows.Count; j++)
{
if (_page.GetRowDataByKey(j, "ID") == ID)
{
rowNum = j;
break;
}
}
#endregion
string mfstr = "\n";
if (!_page.ClientScript.IsClientScriptBlockRegistered("zujs_script1"))
{
_page.ClientScript.RegisterStartupScript(_page.GetType(), "zujs_script1", mfstr);
}
_page.SetGridCellModified(rowNum, "CPDLMXID");
_page.SetGridRowSelected(rowNum, true);
return;
#endregion
}
#endregion
}
}
来源:https://www.cnblogs.com/nuaaydh/p/18583875
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作!
页:
[1]