or
ClientSelectedIndexChanged
handler. To explain...I have a page that contains a RadListBox, a RadTabStrip, and a RadMultiPage which are all linked. When the user selects a item from the RadListBox I use the ClientSelectedIndexChanged handler to check if the linked Tab/PageView already exists and if so then set them selected...if not then they are created and selected server-side. I have a prototype version which uses a RadTreeView that works fine using the set_postback( false ) method on the node in the OnClientNodeClicking handler...does anyone know how to do the same with a RadListBox??
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager><div class="list_view_cont"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" AnimationDuration="1000" IsSticky="True" Transparency="50"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" > <telerik:RadListView ID="RadListView1" runat="server" ItemPlaceholderID="gameList" DataSourceID="sqlDsGames" DataKeyNames="ID,Rating" onitemcreated="RadListView1_ItemCreated"> <LayoutTemplate> <ul> <li class="row_header"> <div class="row_name"> <h2><asp:LinkButton ID="lbtnTitle" CommandName="Sort" CommandArgument="Title" runat="server">MMO Title</asp:LinkButton></h2> </div><!--end row name--> <div class="row_genre"> <h2><asp:LinkButton ID="lbtnCategory" CommandName="Sort" CommandArgument="Category" runat="server">Genre</asp:LinkButton></h2> </div><!--end row genre--> <div class="row_release"> <h2><asp:LinkButton ID="lbtDate" CommandName="Sort" CommandArgument="ReleasedDate" runat="server">Release Date</asp:LinkButton></h2> </div><!--end row release--> <div class="row_platform"> <h2><asp:LinkButton ID="lbtPlatform" CommandName="Sort" CommandArgument="Platform" runat="server">Platform</asp:LinkButton></h2> </div><!--end row platform--> <div class="row_rating"> <h2><asp:LinkButton ID="lbtnRating" CommandName="Sort" CommandArgument="Rating" runat="server">Rating</asp:LinkButton></h2> </div><!--end row rating--> <div class="row_votes"> <h2> <asp:LinkButton ID="lbtnVotes" CommandName="Sort" CommandArgument="Votes" runat="server">Votes</asp:LinkButton></h2> </div><!--end row votes--> </li> <fieldset id="gameList" runat="server" /> </ul> </LayoutTemplate> <ItemTemplate> </ItemTemplate> <AlternatingItemTemplate> </AlternatingItemTemplate> </telerik:RadListView> </telerik:RadAjaxPanel></div><telerik:RadGrid ID="rgNews" runat="server" CellSpacing="0" DataSourceID="sdsNews" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"> <ClientSettings> <Selecting AllowRowSelect="True" /> </ClientSettings><MasterTableView DataKeyNames="newsID" CommandItemDisplay="Top" AllowAutomaticInserts="true" DataSourceID="sdsNews"><CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="newsID" DataType="System.Int32" FilterControlAltText="Filter newsID column" HeaderText="newsID" ReadOnly="True" SortExpression="newsID" UniqueName="newsID" Visible="False"> </telerik:GridBoundColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelText="" FilterControlAltText="Filter EditCommandColumn column" UpdateText=""> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="Title" FilterControlAltText="Filter Title column" HeaderText="Title" SortExpression="Title" UniqueName="Title"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Date" FilterControlAltText="Filter Date column" HeaderText="Date" SortExpression="Date" UniqueName="Date"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Author" FilterControlAltText="Filter Author column" HeaderText="Author" SortExpression="Author" UniqueName="Author"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Publication" FilterControlAltText="Filter Publication column" HeaderText="Publication" SortExpression="Publication" UniqueName="Publication"> </telerik:GridBoundColumn> <%-- <telerik:GridBoundColumn DataField="Content" FilterControlAltText="Filter Content column" HeaderText="Content" Visible="False" SortExpression="Content" UniqueName="Content"> </telerik:GridBoundColumn>--%> <telerik:GridTemplateColumn UniqueName="Content" DataField="Content" HeaderText="Content" Visible="false"> <ItemTemplate> <asp:Label ID="lblContent" Text='<%# Bind("Content") %>' runat="server" /> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtContent" TextMode="MultiLine" Text='<%# Eval("Content") %>' Height="150" Width="200" runat="server"></asp:TextBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="Link" FilterControlAltText="Filter Link column" HeaderText="Link" SortExpression="Link" Visible="false" UniqueName="Link"> </telerik:GridBoundColumn> <telerik:GridButtonColumn CommandName="Delete" Text="Delete" ButtonType="ImageButton" UniqueName= "DeleteColumn" /> </Columns><EditFormSettings CaptionFormatString="Edit news details for {0}" FormCaptionStyle-Font-Bold="true" FormCaptionStyle-ForeColor="#9d273f" CaptionDataField="Title"><EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="ImageButton"></EditColumn></EditFormSettings></MasterTableView><FilterMenu EnableImageSprites="False"></FilterMenu><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> </telerik:RadGrid>
Here is the SQL Datasource code:
<asp:SqlDataSource ID="sdsNews" runat="server"
ConnectionString="<%$ ConnectionStrings:CLSWEBConnectionString %>"
SelectCommand="SELECT [newsID], [Title], [Date], [Author], [Publication], [Content], [Link] FROM [tblNews]"
UpdateCommand="UPDATE [tblNews] set [Title] = @Title, [Date] = @Date, [Author] = @Author, [Publication] = @Publication, [Content] = @Content, [Link] = @Link WHERE [newsID] = @newsID"
DeleteCommand="DELETE FROM [tblNews] WHERE [newsID] = @newsID">
<UpdateParameters>
<asp:Parameter Name="Content" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>