I am loading four RadComboBoxes with months and years with a simple example I found on your website. They render just fine in the browser with all the months and years but I cannot read the selected item value from the code-behind. I load the RadComboBoxes here:
When the RadComboBox item is selected by the user and clicks the submit button ALL references to RadStartYear.Text, RadStartYear.SelectedValue, etc. are null.
What am I doing wrong here? Am I missing something?
Please do not ask me to send a sample project. My project is very large and I have sent it to you before and you could not work with it. I have read all your documentation and examples and do not see what I am missing.
Please just kindly answer my above question.
Thanks much,
Ken
| { |
| int startYear = 2003; |
| DateTimeFormatInfo dtfi = new DateTimeFormatInfo(); |
| RadComboBoxItem riMs = new RadComboBoxItem(); |
| riMs.Text = "Month"; |
| riMs.Value = "Month"; |
| RadComboBoxItem riMe = new RadComboBoxItem(); |
| riMe.Text = "Month"; |
| riMe.Value = "Month"; |
| RadStartMonth.Items.Add(riMs); |
| RadEndMonth.Items.Add(riMe); |
| for (int month = 1; month < 13; month++) |
| { |
| RadComboBoxItem ris = new RadComboBoxItem(); |
| ris.Text = dtfi.GetMonthName(month); |
| ris.Value = dtfi.GetMonthName(month); |
| RadStartMonth.Items.Add(ris); |
| RadComboBoxItem rie = new RadComboBoxItem(); |
| rie.Text = dtfi.GetMonthName(month); |
| rie.Value = dtfi.GetMonthName(month); |
| RadEndMonth.Items.Add(rie); |
| } |
| RadComboBoxItem riYs = new RadComboBoxItem(); |
| riYs.Text = "Year"; |
| riYs.Value = "Year"; |
| RadStartYear.Items.Add(riYs); |
| RadComboBoxItem riYe = new RadComboBoxItem(); |
| riYe.Text = "Year"; |
| riYe.Value = "Year"; |
| RadEndYear.Items.Add(riYe); |
| for (int year = startYear; year <= DateTime.Now.Year + 1; year++) |
| { |
| RadComboBoxItem riYYs = new RadComboBoxItem(); |
| riYYs.Text = year.ToString(); |
| riYYs.Value = year.ToString(); |
| RadStartYear.Items.Add(riYYs); |
| RadComboBoxItem riYYe = new RadComboBoxItem(); |
| riYYe.Text = year.ToString(); |
| riYYe.Value = year.ToString(); |
| RadEndYear.Items.Add(riYYe); |
| } |
| } |
When the RadComboBox item is selected by the user and clicks the submit button ALL references to RadStartYear.Text, RadStartYear.SelectedValue, etc. are null.
What am I doing wrong here? Am I missing something?
Please do not ask me to send a sample project. My project is very large and I have sent it to you before and you could not work with it. I have read all your documentation and examples and do not see what I am missing.
Please just kindly answer my above question.
Thanks much,
Ken
