control
I am new to.net. Is there any way to create interactive grid where we can edit/delete/select data in the grid using the radio buttons which are rendered as hyperlinks. I am using the gridview control in asp.net zero 8.0.0 source code.
A:
The data controls in the gridview control are rendered as html links. In order to use a button instead you need to use a different control.
For example the Table Layout control is very good for this sort of scenario.
protected void EditButton_Click(object sender, EventArgs e)
{
// Get the control clicked
LinkButton linkButton = (LinkButton)sender;
// Get the name of the column you're looking for
GridViewRow row = linkButton.Parent.Parent;
string columnName = row.Cells[1].Text;
// Make sure you have a value to edit
if (columnName == "ColumnName")
{
// Instantiate a new edit form
FormViewExample editForm = new FormViewExample(this.Page, "Edit", linkButton);
// Add the controls to your form
editForm.Controls.Add(new TextBox { Text = "Value to Edit" });
editForm.Controls.Add(new TextBox { Text = "New Value" });
// Display the form
editForm.Show();
}
}
Q:
How do I set up my keyboard so I can navigate directly to a file in vi?
On Ubuntu 17.04 my file browser puts the folder name at the beginning of the path. How do I make it so
Related links:
Comments