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

[Solved] Password field in Edit Grid

2 Answers 296 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erez
Top achievements
Rank 1
Erez asked on 03 Jun 2009, 09:25 AM
Hi,
I'm using radGrid with editing option, one of my columns is "password", when I insert to update/insert view I want to set the password field with textmode=password
I don't want to use "FormTemplate" i'm using - EditFormSettings EditFormType="AutoGenerated".
Can I set GridTextBoxColumnEditor to be a password field ?

Thanks
Erez

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Jun 2009, 10:16 AM
Hello Erez,

You can access the TextBox for the column and set its TextMode to password as shown below:
 protected void RadGrid1_ItemDataBound (object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem editItem = (GridEditableItem)e.Item;            
            ((TextBox)editItem["ColumnUniqueName"].Controls[0]).TextMode = TextBoxMode.Password;            
        } 
    } 

Thanks
Princy.
0
Erez
Top achievements
Rank 1
answered on 03 Jun 2009, 10:19 AM
THANKS
...............
Tags
Grid
Asked by
Erez
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Erez
Top achievements
Rank 1
Share this question
or