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

[Solved] Setting the controlparameter of a ListBox which points to same RadGrid where the Listbox is used

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andre Damsteegt
Top achievements
Rank 1
Andre Damsteegt asked on 07 Sep 2009, 10:57 AM

I'm having trouble with the controlparameter of a ListBox which points to same RadGrid where the Listbox is used.

I want to populate the Listbox depending on the selected value of the Grid, so I've set a controlparameter in the datasource of the ListBox which points to the selectedItem of the Grid. However, the controlparameter always gets the default value. If I set the controlparameter to another grid (not the grid which is the parent of the ListBox) it works fine.

<GRID id=g1 Datasource = DS1>     
    <VIEW> 
    <EDIT>    
        <LISTBOX Datasource=DS2></LISTBOX>    
    </EDIT>    
</GRID>    
    
<DS1>    
    ...     
</DS1>    
    
<DS2>    
    <selectparameters>    
        <asp:ControlParameter ControlID="g1" DefaultValue="0" Name="id" PropertyName="SelectedValue" Type="Int32" />      
    </selectparameters>    
</DS2> 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Sep 2009, 11:27 AM
Hi Andre,

Items in edit mode are not necessarily selected - you may need to select this item explicitly to achieve your goal.

Sincerely yours,
Vlad
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
Grid
Asked by
Andre Damsteegt
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or