or
cbbTO.DataSource = GetMyObjList();
cbbTO.ValueMember = "Id";
and when i want to get the selected one
cbbTO. SelectedItem as MyObj;
returns null?
How can i get the selected databound Item?
thanks
| GridViewCheckBoxColumn chkCol = radGridView1.MasterGridViewTemplate.Columns["Selected"] as GridViewCheckBoxColumn; | |
| if (chkCol != null) | |
| { | |
| radGridView1.MasterGridViewTemplate.Columns.Remove(chkCol); | |
| GridViewCheckBoxColumn chkCol = new GridViewCheckBoxColumn(); | |
| chkCol.DataType = typeof(int); | |
| chkCol.UniqueName = "Selected"; | |
| chkCol.FieldName = "Selected"; | |
| chkCol.HeaderText = ""; | |
| radGridView1.MasterGridViewTemplate.Columns.Add(chkCol); | |
| } |
public
static IntPtr GetDC(Message msg)
{
if (msg.Msg != (int)WindowMessages.WM_NCPAINT)
{
return GetWindowDC(msg.HWnd);
}
int flags = (int)(DCX.DCX_CACHE | DCX.DCX_CLIPSIBLINGS | DCX.DCX_WINDOW );
IntPtr zero = IntPtr.Zero;
if (msg.WParam.ToInt32() != 1)
{
flags |= (
int)DCX.DCX_INTERSECTRGN;
zero = msg.WParam;
}
return GetDCEx(msg.HWnd, zero, flags);
}