Home All Groups Group Topic Archive Search About

how to show dialogbox when click on datagrid template column?

Author
30 Oct 2006 9:55 AM
chandu
hai,
i am using datagrid template column ,it is text box column.
if i put any thing in that cell and when i leave that cell i need to show a
dialog box with that enterd string.
please can any one give answer as early as possible.

Author
30 Oct 2006 3:19 PM
marss
chandu написав:
> hai,
> i am using datagrid template column ,it is text box column.
> if i put any thing in that cell and when i leave that cell i need to show a
> dialog box with that enterd string.
> please can any one give answer as early as possible.

Add client-side function call in the grid item data bound event handler

private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
    TextBox TextBox1 = e.Item.FindControl("TextBox1") as TextBox;
    if (TextBox1 != null)
        TextBox1.Attributes["onblur"] = "alert(this.value);";
}


"TextBox1" is ID of Texbox