5 Answers, 1 is accepted
0
Accepted
John
Top achievements
Rank 1
answered on 20 Oct 2008, 05:39 PM
The code below shows a LinqToSql table being bound to the control and then accessing the value from the control in the SelectedIndexChanged event. Hope this helps.
private void Form1_Load(object sender, EventArgs e) |
{ |
NorthwindDataContext db = new NorthwindDataContext(); |
this.radMultiColumnComboBox1.DataSource = db.Orders; |
this.radMultiColumnComboBox1.ValueMember = "CustomerID"; |
} |
private void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e) |
{ |
this.Text = radMultiColumnComboBox1.SelectedValue.ToString(); |
} |
0
parag patel
Top achievements
Rank 1
answered on 20 Jan 2010, 06:57 AM
hi I am assigning value member of that combobox.
And also attaching data binding with selected value but I am not getting desired value selected value
can you help me in this?
I am putting my code here:
CmbTry.DisplayMember = "RaceType"
CmbTry.ValueMember = "RaceType"
Dim objPatient As PatientMaster
objPatient = PatientMaster.Fetchpatient(3220)
objPatient.Race = "Apache"
CmbTry.DataSource = objDt
CmbTry.DataBindings.Add("SelectedValue", objPatient, "Race")
'CmbTry.DataBindings.Add("SelectedValue", objPatient, "Race", False, DataSourceUpdateMode.OnPropertyChanged)
CmbTry.AutoFilter = True
Dim filter As New FilterExpression(CmbTry.DisplayMember, FilterExpression.BinaryOperation.AND, GridKnownFunction.StartsWith, GridFilterCellElement.ParameterName)
filter.Parameters.Add(GridFilterCellElement.ParameterName, String.Empty)
Me.CmbTry.EditorControl.MasterGridViewTemplate.FilterExpressions.Add(filter)
Me.CmbTry.MultiColumnComboBoxElement.AutoCompleteMode = AutoCompleteMode.None
Me.CmbTry.DropDownStyle = RadDropDownStyle.DropDown
And also attaching data binding with selected value but I am not getting desired value selected value
can you help me in this?
I am putting my code here:
CmbTry.DisplayMember = "RaceType"
CmbTry.ValueMember = "RaceType"
Dim objPatient As PatientMaster
objPatient = PatientMaster.Fetchpatient(3220)
objPatient.Race = "Apache"
CmbTry.DataSource = objDt
CmbTry.DataBindings.Add("SelectedValue", objPatient, "Race")
'CmbTry.DataBindings.Add("SelectedValue", objPatient, "Race", False, DataSourceUpdateMode.OnPropertyChanged)
CmbTry.AutoFilter = True
Dim filter As New FilterExpression(CmbTry.DisplayMember, FilterExpression.BinaryOperation.AND, GridKnownFunction.StartsWith, GridFilterCellElement.ParameterName)
filter.Parameters.Add(GridFilterCellElement.ParameterName, String.Empty)
Me.CmbTry.EditorControl.MasterGridViewTemplate.FilterExpressions.Add(filter)
Me.CmbTry.MultiColumnComboBoxElement.AutoCompleteMode = AutoCompleteMode.None
Me.CmbTry.DropDownStyle = RadDropDownStyle.DropDown
0
Hello Parag,
Deyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for contacting us.
I reviewed your code, but I am not quite sure that I correctly understand the scenario you are trying to implement. Therefore, I would like to ask you to prepare a sample Windows Forms application that demonstrates what you are trying to achieve. This will allow me to provide you with further help.
Please note you have to open a new support ticket in order to attach a sample project.
Thank you for your time.
Deyan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ahmed
Top achievements
Rank 1
answered on 14 Jul 2014, 07:34 PM
hi i have Multi-column Combo box
<telerik:RadComboBox ID="RadComboIteamCode" runat="server" Width="350px"
EmptyMessage="Choose a Product" HighlightTemplatedItems="true" EnableLoadOnDemand="true"
Filter="StartsWith" onitemsrequested="RadComboIteamCode_ItemsRequested"
OnClientDropDownClosed="OnClientDropDownClosed">
<HeaderTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
Product Code
</td>
<td style="width: 200px;">
Product Name
</td>
<td style="width: 60px;">
Product Price
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 200px;">
<%# DataBinder.Eval(Container, "Attributes['ProductName']")%>
</td>
<td style="width: 60px;">
<%# DataBinder.Eval(Container, "Attributes['ProductPrice']")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
and in client side i wanna select the value and text of this combobox
i try all functions i find (get_text ,get_value .....)and in the end get Null or the Empty Message or nothing
i wish if you can help me in that
<telerik:RadComboBox ID="RadComboIteamCode" runat="server" Width="350px"
EmptyMessage="Choose a Product" HighlightTemplatedItems="true" EnableLoadOnDemand="true"
Filter="StartsWith" onitemsrequested="RadComboIteamCode_ItemsRequested"
OnClientDropDownClosed="OnClientDropDownClosed">
<HeaderTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
Product Code
</td>
<td style="width: 200px;">
Product Name
</td>
<td style="width: 60px;">
Product Price
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 275px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 100px;">
<%# DataBinder.Eval(Container, "Text")%>
</td>
<td style="width: 200px;">
<%# DataBinder.Eval(Container, "Attributes['ProductName']")%>
</td>
<td style="width: 60px;">
<%# DataBinder.Eval(Container, "Attributes['ProductPrice']")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
and in client side i wanna select the value and text of this combobox
i try all functions i find (get_text ,get_value .....)and in the end get Null or the Empty Message or nothing
i wish if you can help me in that
0
Hello Ahmed,
Your code seems to concern a ASP.NET AJAX control, while this forums is for Telerik UI for WinForms. Please address your question in the appropriate forums (http://www.telerik.com/forums/aspnet-ajax) in order to get adequate support.
I hope this helps.
Regards,
Stefan
Telerik
Your code seems to concern a ASP.NET AJAX control, while this forums is for Telerik UI for WinForms. Please address your question in the appropriate forums (http://www.telerik.com/forums/aspnet-ajax) in order to get adequate support.
I hope this helps.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.