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:
<asp:ButtonColumn HeaderText="Operations" DataTextField="TeamOperation" ButtonType="LinkButton"></asp:ButtonColumn>
and code behind:
private void dgoperation_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
SqlCommand myCommand=new SqlCommand();
myCommand.CommandText="select * from dbo.DashBoard where Name = @Billing";
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
dgis.EditItemIndex = -1;
dgis: this is the datagrid that where user inserts data.
dgbilling: this is the datagrid with the name list.