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

Radcombo DataBinding...

3 Answers 91 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
raaj
Top achievements
Rank 1
raaj asked on 03 Jan 2012, 03:10 PM

Hi,

I've my design as follows....attached herewith the screenshot also....

 <table>
                                                                <tr>
                                                                    <td id="Td1">
                                                                        <span class="smallTitle">Column Repeat</span><br />
                                                                        <telerik:RadComboBox ID="uxCheckboxChoicesColumnRepeat1" runat="server" OnClientSelectedIndexChanged="CheckBoxChoicesColumnRepeatChanged1">
                                                                            <Items>
                                                                                <telerik:RadComboBoxItem Text="One Column" Value="1" />
                                                                                <telerik:RadComboBoxItem Text="Two Columns" Value="2" />
                                                                                <telerik:RadComboBoxItem Text="Three Columns" Value="3" />
                                                                                <telerik:RadComboBoxItem Text="Four Columns" Value="4" />
                                                                            </Items>
                                                                        </telerik:RadComboBox>
                                                                    </td>
                                                                </tr>
                                                                 <tr>
                                                                    <td>
                                                                        <asp:Panel runat="server" ID="uxJumpPanel">
                                                                            <telerik:RadListView ID="feeldChoices" runat="server" OnItemDataBound = "feeldChoices_ItemDataBound" >
                                                                                <ItemTemplate>
                                                                                    <table cellpadding="0" cellspacing="0">
                                                                                        <tr>
                                                                                            <td>
                                                                                                <telerik:RadTextBox runat="server" Text='<%# Eval("Text") %>' onkeyup="SyncListToCheckbox(this)"
                                                                                                    ID="uxItemText" Width="260">
                                                                                                </telerik:RadTextBox>
                                                                                                  <telerik:RadComboBox runat="server" ID="uxSelectPage1" ></telerik:RadComboBox>
                                                                                            </td>

                                                                                            <td>
                                                                                                <img id="imageAdd" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,add|' + this.id + ',' + selectedDockId); SetUnsaved();"
                                                                                                    alt="Add field choice" border="0" src="Images/Add.png" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <img id="imageDelete" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,remove|' + this.id + ',' + selectedDockId); SetUnsaved();"
                                                                                                    alt="Delete field choice" border="0" src="Images/Delete.png" />
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </ItemTemplate>
                                                                            </telerik:RadListView>
                                                                        </asp:Panel>
                                                                    </td>
                                                                </tr>
                                                             
                                                            </table>
my intention is, when i click the edit button all the 3 radcombobox (uxSelectPage1) should display the already saved data.
 I tried Itemdatabound its not working for me...any other solution.

//Thanks

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Jan 2012, 03:31 PM
Hello Raj,

You could achieve this by accessing the control in the button click and set the selected text for the ComboBox.

The following help article will help you to to get a start.
Accessing Controls in RadListView.
Working with Items in Server Side Code

Thanks,
Princy.
0
raaj
Top achievements
Rank 1
answered on 04 Jan 2012, 12:13 PM

Hi Princy,

I tried as you said, It's not working. Just send me if you have any such sample application.

//Thanks

0
Ivana
Telerik team
answered on 05 Jan 2012, 05:03 PM
Hello,

Take a look at the server and client API of the RadListView to get familiar with the server / client-side events and properties of the control.
Following the documentation articles referenced by Princy, you would be able to access the RadComboBoxes in RadListView's templates and manipulate with their items (add, remove, select items).

Hope this is helpful.

Greetings,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
General Discussions
Asked by
raaj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
raaj
Top achievements
Rank 1
Ivana
Telerik team
Share this question
or