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

[Solved] RadCombox and Other controls

9 Answers 172 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
w
Top achievements
Rank 1
w asked on 23 Aug 2009, 01:03 PM
Supports,

I am testing and migrating the asp.net control to telerik asp.net for AJAX control,  i haved testing few controls , eg. RadComboBox and RadTextBox, both got problems with the timing of databinding to behind datatable datasource,e.g.  whenenver data been changed (or edited) inside the control like RadCombox selectedIndexChanged event for example, it wont bind to the behind datatable  immediately, rather when formview.updateitem  been called it will reflected the value in the datatable, which is too late for my usage, as my programming all base on the datatable value changed to response relevant actions. So do as other telerick contols. 
Apprecate is any solutions for that or I miss out some points in somewhere ?   

9 Answers, 1 is accepted

Sort by
0
w
Top achievements
Rank 1
answered on 24 Aug 2009, 03:51 PM
how come nobodady response? am i make myself clear of the problem?
0
Simon
Telerik team
answered on 25 Aug 2009, 10:31 AM
Hello w,

You need to manually update the data base when the SelectedIndexChanged event fires as RadComboBox does not do this automatically.

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
w
Top achievements
Rank 1
answered on 25 Aug 2009, 10:36 AM
Simon, Thanks for your reply.

Is that means, when a item been selected or a value been keyed in (refer to RadTextBox Control), it will not automatically bind to DataTable object relevant fields (I am not referring Database, rather DataTable datasource)?

But it works for asp.net 2.0 normal controls, like drondownlist and textbox, the above actions are automatically performed when value been keyed in or selected.   
0
Simon
Telerik team
answered on 25 Aug 2009, 11:40 AM
Hello w,

Yes, RadComboBox does not automatically update the data base when the selection changes. Even the standard ASP.NET controls you mentioned do not.

Are you referring to the FormView's underlying data source? Please provide a more specific issue description.

All the best,
Simon
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
w
Top achievements
Rank 1
answered on 25 Aug 2009, 12:16 PM
Yes, Simon, you are right, i am referring FormView's underlying data source, below is the example,

 <asp:FormView ID="FormView1" runat="server" DataMember="LedgerTransactions" DataSourceID="DBDataSource1"
            DataKeyNames="CompanyID,GLTransactionNumber"  EnableviewState="True">

 <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="DBDataSource1" DataMember="LedgerTransactions"
  DataTextField="LedgerAccountProofDescription" DataValueField="LedgerAccountProofType" SelectedValue='<%# Bind("LedgerAccountProofType") %>' DropDownWidth ="250" OffsetX ="-60" Height ="270" Width ="98%"
   HighlightTemplatedItems = "true" Sort="Ascending" MarkFirstMatch="True" autopostback="true" SkinID="dropdownSkin">

</asp: FormView>

I just want to get clear when will be the value ("LedgerAccountProofType") been reflected to the underlying DataMember object when user make selection at the Drow down.

base on my testing, it only reflected when FormView1.updateItem been called.  On the other hand, asp.net 2.0 DrowdownList control will stored the value to the undelying DataMember object when user make selection of the value from the Drowdown, which is logical in the sense. 

RadTextBox Control  got another problem, which is whenever I update value to the field of underlying DataMember object, it will not reflected at screen, rather i need refresh the browser and it will show into RadTextBox.    

 
0
Simon
Telerik team
answered on 28 Aug 2009, 08:47 AM
Hello w,

I was unable to reproduce what you described - a DropDownList did not update the data base when its Index is changed. This happened only after the Update command of the containing FormView executed.

Please see the attached project where I tested this functionality. Notice that the data in the DetailsView, which is right below the FormView, does not update until the Update command of the latter executes.

Am I missing something?

Kind 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
w
Top achievements
Rank 1
answered on 29 Aug 2009, 02:51 PM
Simon,

you are still referring data update to the database, which is not my case.

the Drowndownlist or RadComboBox control bind to a DataSet.DataTable(tableName) object, and DataSet object will responsible to update to actual database(northwind.mdb) itself, this part no problem with both controls. Below.DBDataSource1 is DataSet and  LedgerTransactions is DataTable Object.

<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="DBDataSource1" DataMember="LedgerTransactions"
  DataTextField="LedgerAccountProofDescription" DataValueField="LedgerAccountProofType" SelectedValue='<%# Bind("LedgerAccountProofType") %>' DropDownWidth ="250" OffsetX ="-60" Height ="270" Width ="98%"
   HighlightTemplatedItems = "true" Sort="Ascending" MarkFirstMatch="True" autopostback="true" SkinID="dropdownSkin" />

at the server side coding, i am adding the handle to response the DataTable.ColumnChanging event in order to monitor which field did the user has make changes. and up to this point, nothing do with updating to database (nothwind.mdb). 

I was using Drowndownlist in ASP.NET 2.0 control working fine for the pass, meaning whenver user has make changes to the Drondownlist (not only selectionIndexChanged, also when user key in value into drowdownlist), the underlying DataTable object will changed immediately when the control lost forcus, and the above event was fired. 

But, for RadComboBox, it does not fire the event or rather say no value save it  to the underlying DataTable object when user make changes to the RadComboBox, but it does when I make call Formview.UpdateItems, which is not logical. 

Your sample project just have one layer, from control direct update to database, what I have, Control -->DataTable-->Database.  as my project is quite complicated, a lot of layers, i am trying to figure out a sample project and attached it if possible.
  
0
w
Top achievements
Rank 1
answered on 05 Sep 2009, 08:58 AM
simon,

any reply of the said issues?
0
Accepted
Simon
Telerik team
answered on 08 Sep 2009, 10:01 AM
Hello w,

I am still unable to understand your configuration.

Could you paste here the minimum definitions of the FormView and your middle layer, so that I use them to recreate the issue at my side?

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.
Tags
ComboBox
Asked by
w
Top achievements
Rank 1
Answers by
w
Top achievements
Rank 1
Simon
Telerik team
Share this question
or