hi,
Ive got the following question.
I have an asp.net website with a repeater. when the page is load it loads al the records.
however when I click on the edit button in a row withing the reapeater. it should hide the rows where I didn't klick the edit button on.
- protected void rptAltNumbers_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
- {
-
- RepeaterItem itemRow;
- TextBox textBoxInRow;
- string theValueInTextBox= null;
- var value = ((TextBox)e.Item.FindControl("tbNumber")).Text;
-
- switch (e.CommandName)
- {
- case "Edit":
-
-
- ((TextBox)e.Item.FindControl("tbNumber")).Visible = true;
-
-
- ((Label)e.Item.FindControl("lblNumber")).Visible = false;
-
-
- ((Button)e.Item.FindControl("alternatenumbereditbutton")).Visible = false;
-
-
- ((Button)e.Item.FindControl("deleteButton")).Visible = false;
-
-
- ((Button)e.Item.FindControl("alternatenumbersubmitbutton")).Visible = true;
-
-
-
- break;
-
- case "Submit":
- itemRow = e.Item;
- textBoxInRow = ((TextBox)itemRow.FindControl("tbNumber"));
- theValueInTextBox = textBoxInRow.Text;
-
-
- ((TextBox)e.Item.FindControl("tbNumber")).Visible = false;
-
-
-
- ((Label)e.Item.FindControl("lblNumber")).Visible = true;
-
-
- ((Button)e.Item.FindControl("alternatenumbereditbutton")).Visible = true;
-
-
- ((Button)e.Item.FindControl("alternatenumbersubmitbutton")).Visible = false;
-
- ows in repeater where Textbox != value .??? how
- break;
-
- case "Delete":
-
-
- var waitHere = "ok";
- break;
- }
- }