Dim pobjTable As New Data.DataTable
pobjTable.Columns.Add("ID")
pobjTable.Columns.Add("Name")
pobjTable.Rows.Add(1001, "User A")
pobjTable.Rows.Add(1002, "User C")
pobjTable.Rows.Add(1003, "User B")
RadComboBox1.DataSource = pobjTable
RadComboBox1.DisplayMember = "Name"
So if User C is selected, I would like to get 1002 back as the ID.
Note: This is possible in the VB.Net Combo Box if you create a class to store the ID and the Text Value. You can add an object to the List and return the Object once selected.
Best Regards
Eddie
using System.Text; | |
using System.Windows.Forms; | |
namespace TelerikGrid | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
StringBuilder text = new StringBuilder(65536); | |
for (int i = 0; i < 65536; ++i) text.Append('B'); | |
GridText gridText = new GridText(); | |
gridText.Text = text.ToString(); | |
radGridView1.DataSource = new GridText[] {gridText}; | |
} | |
} | |
public class GridText | |
{ | |
private string _text = string.Empty; | |
public string Text | |
{ | |
get { return _text; } | |
set { _text = value; } | |
} | |
} | |
} |
I downloaded the RadControls for WinForms and I'm having a little trouble. I was trying to use a RadTitleBar control, and looking at the documentation it says to start by creating a RadShapedForm.
The documentation says to create the RadShapedform as mentioned in the QuickStart.
My problem is, I can't seem to find a QuickStart that describes how to create a RadShapedForm.. I tried searching the documentation and it turned up nothing.
Thanks!!
mGridData = new BindingList<SentenceViewerGridData>(); |
mRadGridView.DataSource = mGridData; |
foreach (Element sentence in elementArray) |
{ |
mGridData.Add(new SentenceViewerGridData(sentence.Field[0], sentence.Field[1])); |
} |
radGvAllocateList.MasterGridViewTemplate.AutoGenerateColumns = false; ; |
GridViewTextBoxColumn colText = new GridViewTextBoxColumn(); |
colText.UniqueName = "colStaff"; |
colText.HeaderText = FormText.Collector; |
colText.Width = 100; |
radGvAllocateList.MasterGridViewTemplate.Columns.Add(colText); |
GridViewTextBoxColumn colRate = new GridViewTextBoxColumn(); |
colRate.UniqueName = "colRate"; |
colRate.DataType = typeof(decimal); |
colRate.HeaderText = FormText.Collector; |
colRate.Width = 60; |
radGvAllocateList.MasterGridViewTemplate.Columns.Add(colRate); |