In the gridview the default the cell formats should look like 0000.00
when the user tries to edit the cell
for Example : when the user wants to type 100 ,
on typing first digit (ie) 1 - cell should show it has 0000.01
on typing the next digit (ie) 0 - it should show as 0000.10
on typing the last digit (ie) 0 - it should show as 0001.00
that is , each char has to append one after the another in the above format
i m using this method.maybe helpfull some new developers like me.
public void changeyourcolumnsname()
{string conn="Data Source=yourdatasource; User Id=youruserid; Password=yourpassword; Initial Catalog =yourdataname;";
using
(SqlConnection connection = new SqlConnection(conn))
{
connection.Open();
DataSet ds = new DataSet();
SqlDataAdapter adp = new SqlDataAdapter("select col1,col2,col3,col4 from yourtable",connection);
adp.Fill(ds, "yourtable");
this.radMultiColumnComboBox1.DataSource = ds.Tables[0];
FilterDescriptor descriptor =
new FilterDescriptor(this.radMultiColumnComboBox1.DisplayMember, FilterOperator.StartsWith, string.Empty);
this.radMultiColumnComboBox1.EditorControl.FilterDescriptors.Add(descriptor);
this.radMultiColumnComboBox1.DropDownStyle = RadDropDownStyle.DropDown;
this.radMultiColumnComboBox1.EditorControl.Columns[0].HeaderText = "mycolumns1";//change your col1
this.radMultiColumnComboBox1.EditorControl.Columns[1].HeaderText = "mycolumns2";//change your col2
this.radMultiColumnComboBox1.EditorControl.Columns[2].HeaderText = "mycolumns3";//change your col3
this.radMultiColumnComboBox1.EditorControl.Columns[3].HeaderText = "mycolumns4";//change your col4
connection.Close();
}
private
void yourform_Load(object sender, EventArgs e)
{
this.radMultiColumnComboBox1.AutoSizeDropDownToBestFit = true;
RadMultiColumnComboBoxElement multiColumnComboElement =
this.radMultiColumnComboBox1.MultiColumnComboBoxElement;
multiColumnComboElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
multiColumnComboElement.DropDownMinSize =
new Size(420, 300);
multiColumnComboElement.EditorControl.MasterGridViewTemplate.AutoGenerateColumns =
false;
this.radMultiColumnComboBox1.AutoFilter = true;
changeyourcolumnsname();
}