I was having the situation where I have to show the account name in the application and consider accountid in functioning like insert, update.
Point to note here is i don't want to se any kind of list control like dropdown,listbox,etc.
So, I have created my own Text Box control which will provide me the facility to maintain the ID of the text.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public class MyTextBox : TextBox
{
private string _valueID;
public string ValueID
{
get
{
return _valueID;
}
set
{
_valueID = value;
}
}
protected override void OnCreateControl()
{
this.ReadOnly = true;
base.OnCreateControl();
}
}
}
Thanks
Dalip Vohra
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment