This is a migrated thread and some comments may be shown as answers.

[Solved] rad combo in user control not passing values from it

2 Answers 176 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Awadh .
Top achievements
Rank 1
Awadh . asked on 18 Nov 2009, 12:15 PM
Hi All,

I am using rad combo in user control. This user control is being called as edit control in rad grid.
I successfully showing data from database in rad combo box on click of edit icon in grid.
But,
When i m updating, the data/text/value contained in the combo is not there and m unable to find value/test in it . Hence its passing NULL to stored procedure as parameter.

if (e.CommandArgument.ToString() == "Edit")  
                { 
                    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); 
                    RadTextBox txtOrderValue = userControl.FindControl("txtOrderValue") as RadTextBox; 
                    RadTextBox txtCostOfSale = userControl.FindControl("txtCostOfSale") as RadTextBox; 
                    RadComboBox ddlCurrency = userControl.FindControl("ddlCurrency") as RadComboBox; 
                    RadComboBox ddlReason = userControl.FindControl("ddlForReason") as RadComboBox; 
                     
 
                    //Prepare new row to add it into DataSource 
                    DataSet dsValidate = new DataSet(); 
                    int userID = Convert.ToInt16(hidUserId.Value); 
                  
                    Convert.ToSingle(txtOrderValue.Text); 
                    _Order.CostOfSale = Convert.ToSingle(txtCostOfSale.Text); 
                    _Order.Creator = Convert.ToInt16(hidUserId.Value); 
                     
                    _Order.CurrencyCode = ddlCurrency.SelectedValue.ToString(); 
                    _Order.Reason = ddlReason.SelectedValue.ToString(); 


Can anybody tell why this is happening? I am getting this problem with ddlCurrency and ddlReason both.


Thanks,
Awadh

2 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 18 Nov 2009, 03:22 PM
Hi Awadh .,

I am not sure why this is happening.

Could you please have a look at the attached working project and compare it to yours?

I hope it will help you find the cause of the issue on your side.

Regards,
Simon
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
Awadh .
Top achievements
Rank 1
answered on 18 Nov 2009, 04:12 PM
Hi Simon,

I checked with code in attached files, but of no result. Same problem.

Even my code is almost similar to attached files and in same architecture.

Still I have no clue why its happening ? can you please help me to get out of this issue ?


Thanks,
Awadh

Tags
ComboBox
Asked by
Awadh .
Top achievements
Rank 1
Answers by
Simon
Telerik team
Awadh .
Top achievements
Rank 1
Share this question
or