This is a migrated thread and some comments may be shown as answers.

textboxes in editmode for password

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 21 Dec 2013, 12:50 PM
Hi
How to have textboxes in editmode for password to be in **** format.?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Dec 2013, 12:57 PM
Hi Ryann,

Please try the following code snippet.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
//To change the password in * format in edit mode
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
 {
    GridEditableItem edit = (GridEditableItem)e.Item;
    TextBox txt = (TextBox)edit["ColumnUniqueName"].Controls[0];  
    string value = txt.Text;
    txt.Text = "";
    foreach (char c in value)
        txt.Text += "*";
 }
}

Thanks,
Shinu
Tags
Grid
Asked by
Ryann
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or