Can anybody give me a clue as to how to display password characters in place of the text in a WebDataGrid?
I've figured out how to do this when I am adding or editing a cell using a Grid Editor Provider, but it's not clear to me how to change the display to replace the text with password characters when I am just viewing the data table.
Appreciate any help!
Hello ptiedman and rsutton333,
I recommend you using Templated column containing WebTextEditor in the ItemTemplate.
By setting the border styles and colors you can make it looks like non templated field :
<ig:TemplateDataField Key="CategoryName" Width="250px">
<ItemTemplate>
<ig:WebTextEditor ID="WebTextEditor1" runat="server"
Value='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "CategoryName") %>'
TextMode="Password" ReadOnly="false" BorderStyle="None"
BorderColor="Transparent" BackColor="Transparent">
</ig:WebTextEditor>
</ItemTemplate>
<Header Text="CategoryName" />
</ig:TemplateDataField>
Hope this helps
Tsvetelina,
Thank you for the suggestion. It does address my issues with the password masking behavior in the UI, however I have not been able to determine how to get at the value in a template editor for each row of my grid during the post back when trying to save my data.
We have used the UltraWeb tools for several years, and are still stumbling along our way trying to learn the new Aikido controls.
I wrote some helper methods to get my index from my column name in my grids and then try to retrieve the value of the row (GridRecord) Items collection. This works fine for simple BoundDataField columns, but not the TemplateDataFields.
Public Shared Function GetColumnIndexFromKey(ByVal wdg As WebDataGrid, key As String) As Int32
Dim inx As Int32 = -1
inx = wdg.Columns.FromKey(key).Index
Return inx
End Function
val =
Convert.ToString(row.Items.GetValue(GetColumnIndexFromKey(wdg, key)))