0

I have a Grid Panel of extension .net control in my web application .Now the grid panel is bind with Store . I have encrypted login user name & the database stores encrypted login name . Now I want the grid panel to show the actual decrypted data in the field . But I have no idea regarding where to decrypt during building of grid data in extension .net controls. Plz help.

1 Answers1

0

Before the datasource of Source was bound, I simply called a for loop of Db data just like a rowbounddata event, & within that I decrypted my column(field) data. At last bind the latest datasource

for (int i = 0; i < this.getUserList(this.getUserFilter()).Count; i++)
{
  this.getUserList(this.getUserFilter())[i].LoginName = CommonUtilities.Decrypt(this.getUserList(this.getUserFilter())[i].LoginName, ConfigurationManager.AppSettings["EightCharacterEncryptionKey"]);
}
this.Store1.DataSource = this.getUserList(this.getUserFilter());
this.Store1.DataBind();
j0k
  • 22,600
  • 28
  • 79
  • 90