In this post , I explained how to
Bind Combobox windows application, and selection Changed Event source code.
using System;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
usingTelerik.WinControls;
namespace company
{
public partial class Receipts : Telerik.WinControls.UI.RadForm
{
publicReceipts()
{
InitializeComponent();
}
private void cmbChit_SelectionChangeCommitted(object sender, EventArgse)
{
if(cmbChit.SelectedIndex > 0)
{
SqlDataAdapterda = new SqlDataAdapter("select * from MASTER where CODE='" + cmbChit.SelectedValue + "'", con);
DataSetds = new DataSet();
da.Fill(ds, "Details");
if(ds.Tables[0].Rows.Count > 0)
{
txtChitAmount.Text = ds.Tables[0].Rows[0]["AMOUNT"].ToString();
txtBidDay.Text = ds.Tables[0].Rows[0]["DAY_OF_BID"].ToString();
txtChitName.Text = ds.Tables[0].Rows[0]["NAME"].ToString();
}
}
else
{
txtChitAmount.Clear();
txtBidDay.Clear();
txtChitName.Clear();
}
} }
}