Hi All,
I am using webdropdown of version 10.2 in my current project. I have a WebDataGrid inside webdropdown's itemTemplate. This webdropdown has 2 clientside events (ValueChanged,SelectionChanged). The valuechanged event is working fine but selectionchanged event is not working. The following is my sample code for webdropdown.
<ig:WebDropDown ID="WebDropDown1" runat="server" Width="400px" EnableClosingDropDownOnBlur="true" EnableClosingDropDownOnSelect="true" DropDownContainerHeight="500px" DropDownContainerWidth="550px" AutoFilterResultSize="1" CurrentValue="Select a Region" EnableMarkingMatchedText="True" TextField="School"> <DropDownItemBinding TextField="School" /> <Items> <ig:DropDownItem> </ig:DropDownItem> </Items> <ItemTemplate> <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" Width="100%" DataSourceID="SqlDataSource1"> <Columns> <ig:BoundDataField Hidden="true" DataFieldName="Territory" Key="Territory"> <Header Text="Territory" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="School" Key="School"> <Header Text="School" /> </ig:BoundDataField> <ig:BoundDataField Hidden="true" DataFieldName="LinkVal" Key="LinkVal"> <Header Text="LinkVal" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="PY" Key="PY"> <Header Text="PY" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="CY" Key="CY"> <Header Text="CY" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Diff" Key="Diff"> <Header Text="Diff" /> </ig:BoundDataField> </Columns> <ClientEvents Initialize="initWebDataGrid" /> <Behaviors> <ig:Selection RowSelectType="Single" Enabled="True" CellClickAction="Row"> <SelectionClientEvents RowSelectionChanged="rowSelChange" /> </ig:Selection> <ig:Filtering Enabled="true" Visibility="Hidden" /> </Behaviors> </ig:WebDataGrid> </ItemTemplate> <ClientEvents SelectionChanging="cancelDDSel" ValueChanged="filterGrid" SelectionChanged="indexChanging1" /> </ig:WebDropDown>
I created the same dropdown using HTML table instead of WebDataGrid under ItemTemplate and it is working fine.
Am I missing anything here for the Webdatagrid? My requirement is allow the user to sort the columns so I am using WebDataGrid instead of HTML table.
Please help me.
Hi,
the selection event is for the dropdown, which only has one templated item. So selection actually fires, but what is the point if you only have 1 item which is a WebDataGrid - it will always select that "item".
What you probably want is row selection for the WebDataGrid, which is something quite different and is part of the WebDataGrid functionality. There is an online sample that shows how to do this:
http://samples.infragistics.com/2010.2/WebFeatureBrowser/contents.aspx?showCode=true&t=WebDropDown/WebDropDownTemplates.aspx~srcview.aspx?path=~srcview.aspx?path=WebDropDown/WebDropDownTemplates.src
(the first dropdown)
Hope it helps,
Angel
Hi Angel,
Thank you for your response.
Actually I am reffering the same sample for my requirement.
My Requirement: I have 3 casading webdropdowns (grid inside the dropdown) in my form. They need to have TypeAhead funtionality along with grid sorting capability.
In the example you mentioned, first dropdown doesnt support typeahead funtionality. The second dropdown doesnt have sorting option. I need both TypeAhead and sorting capability.