如题所示!
谢谢高手

解决方案 »

  1.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=81277B42-361C-4FAB-9A1E-B661ABE517F5
      

  2.   


    if(条件)      //你判断权限的条件
    {


    foreach(DataGridItem dgi in MyDataGrid1.Items)
    { LinkButton lbtn1= (LinkButton)dgi.FindControl("Linkbutton1");
    if (lbtn1 != null)
    lbtn1.Visible=true;
    } }
    我的DataGrid中有两个按钮一个为编辑,一个为删除,Linkbutton1是删除按钮的id
    你可以根据这个改一下就可以了
      

  3.   

    wangdequan1024(紫夜) 的方法绝对可行
      

  4.   

    在DataBanding事件中对用户进行判断,根据判断结果决定是否隐藏!
      

  5.   

    按照wangdequan1024(紫夜)得方法做就可以了 !!!!
      

  6.   

    定义按钮列名`判断按钮的HeaderText属性是否可见`用条件语句来选择Visible属性
      

  7.   

    private void DataGrid2_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
    {
    if(条件)
    {
    DataGrid2.EditItemIndex = e.Item.ItemIndex;//  编辑
    BindGrid();
    }
    else Response.Write("<script>alert('你无此权利编辑')</script>");
    }
      

  8.   

        string selCmd="select admin from Ex09_GuestBook where name=name and pwd=pwd  order by ID DESC";
    SqlDataAdapter da = new SqlDataAdapter(selCmd,myConnection);
    DataSet ds = new DataSet();
    da.Fill(ds,"word");
    DataGrid1.DataSource = ds.Tables["word"].DefaultView;如何取得admin的值出来