Button Column Select!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nclauder
    New Member
    • Jan 2007
    • 6

    #1

    Button Column Select!

    Hi all,
    I have a datagrid with Button column select in form of hyperlink. On the same page, I have another datagrid that insert data and one column(Name) has Names of a user that is inserting data(using windows authentication) .
    Now this is how it's supposed to work: When any user want to see data about a particular user it's a matter of selecting his name and the data Writen by the selected user should be the only ones to be shown.
    I got some examples on Google but they all seem not to be working. When a user is selected the page remains the same data is not selected. How would can I solve this problem?
    My code looks like this:
    HTML part:
    <Columns>
    <asp:ButtonColu mn HeaderText="Ope rations" DataTextField=" TeamOperation" ButtonType="Lin kButton"></asp:ButtonColum n>
    </Columns>
    and code behind:
    private void dgoperation_Ite mCommand(object source, System.Web.UI.W ebControls.Data GridCommandEven tArgs e)
    {
    SqlCommand myCommand=new SqlCommand();
    myCommand.Conne ction=con;
    myCommand.Comma ndText="select * from dbo.DashBoard where Name = @Billing";
    myCommand.Param eters.Add(new SqlParameter("@ Billing",SqlDbT ype.VarChar,50) );
    myCommand.Param eters["@Billing"].Value= dgbilling;
    SqlDataAdapter myAdapter=new SqlDataAdapter( myCommand);
    DataSet ds = new DataSet();
    myAdapter.Fill( ds);
    dgis.DataSource =ds;
    dgis.EditItemIn dex = -1;
    dgis.DataBind() ;
    }
    I'm using asp.net1.0, C# language To develop a web site.

    dgis: this is the datagrid that where user inserts data.
    dgbilling: this is the datagrid with the name list.
    Thanks.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Do you receive an error?

    Comment

    Working...