且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用多个控件进行搜索,我想在gridview中显示数据

更新时间:2023-10-12 15:37:52

HI,

每个网格都有一个RowCommand事件.在RowCommand事件中找到控件.


Every grid have a RowCommand event. In RowCommand event you find the controls.


尝试类似的方法:
Try something like:
//Something similar to this
protected void Gridview_RowDataBound(object sender, DataGridItemEventArgs e)
{
     Textbox tbx = (TextBox)e.Row.FindControl("IWantedToGetThisTextbox");
     if (tbx != null)
     {
         // you got tbx.Text  value here. Do any calculation desired.
        
     }
}