or
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
to the Masterpage because we can add only one instance of a ScriptManager to a page, no items where shown in the RadTabStrip.
Thanks
| <telerik:GridTemplateColumn HeaderText="BoM" UniqueName="BoMID" FilterControlWidth="30px" |
| AllowFiltering="true" DataType="System.Int32" DataField="BoMID" ReadOnly="True"> |
| <ItemTemplate> |
| <asp:Literal ID="litBoM" runat="server" Text='<%#FormatBoMColumn(Eval("BoMID"))%>'></asp:Literal> |
| </ItemTemplate> |
| <FilterTemplate> |
| <telerik:RadComboBox ID="ImportedFilter" runat="server" |
| AllowCustomText="false" DropDownWidth="70px" Width="15px"> |
| <Items> |
| <telerik:RadComboBoxItem Text="No Filter" Value="" /> |
| <telerik:RadComboBoxItem Text="Yes" Value="1" /> |
| <telerik:RadComboBoxItem Text="No" Value="0" /> |
| </Items> |
| </telerik:RadComboBox> |
| <telerik:RadScriptBlock ID="RadScriptBlock12" runat="server"> |
| <script type="text/javascript"> |
| function RethrownSelectedIndexChanged(sender, args) { |
| var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>"); |
| var filterVal = args.get_item().get_value(); |
| if (filterVal == null) { |
| tableView.filter("BoMID", filterVal, "NoFilter"); |
| } |
| else if (filterVal == 1) { |
| tableView.filter("BoMID", 0, "GreaterThan"); |
| } |
| else if (filterVal == 0) { |
| tableView.filter("BoMID", null, "EqualTo"); |
| } |
| } |
| </script> |
| </telerik:RadScriptBlock> |
| </FilterTemplate> |
| <HeaderStyle Width="40px" Wrap="False" HorizontalAlign="Center" /> |
| <ItemStyle Width="40px" Wrap="False" HorizontalAlign="Center" /> |
| </telerik:GridTemplateColumn> |

| <telerik:RadGrid ID="rgSource" runat="server" AllowMultiRowSelection="true" ShowStatusBar="true" |
| AutoGenerateColumns="false" EnableEmbeddedBaseStylesheet="true" ShowDesignTimeSmartTagMessage="true" |
| EnableEmbeddedSkins="false" GridLines="None" Skin="TR" EnableAjaxSkinRendering="true" |
| EnableEmbeddedScripts="false" EnableViewState="true" |
| onneeddatasource="rgSource_NeedDataSource" onrowdrop="rgSource_RowDrop" |
| onprerender="rgSource_PreRender"> |
| <MasterTableView TableLayout="Fixed" Width="100%" runat="server"> |
| <Columns> |
| </Columns> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| </MasterTableView> |
| <ClientSettings AllowRowsDragDrop="true"> |
| <Selecting AllowRowSelect="True"/> |
| <DataBinding EnableCaching="true"/> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true"/> |
| <ClientEvents OnRowDropped="onRowDropping" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| <telerik:RadGrid runat="server" ID="rgTarget" EnableEmbeddedScripts="false" |
| AllowMultiRowSelection="true" EnableEmbeddedBaseStylesheet="true" EnableViewState="true" |
| EnableEmbeddedSkins="false" GridLines="None" Skin="TR" AutoGenerateColumns="false" |
| onneeddatasource="rgTarget_NeedDataSource" onrowdrop="rgTarget_RowDrop1" |
| onprerender="rgTarget_PreRender"> |
| <MasterTableView TableLayout="Fixed" ShowHeadersWhenNoRecords="true" NoMasterRecordsText="" runat="server" > |
| <Columns> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings AllowRowsDragDrop="True"> |
| <Selecting AllowRowSelect="True" EnableDragToSelectRows="false"/> |
| <DataBinding EnableCaching="true"/> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true"/> |
| <ClientEvents OnRowDropped="onRowDropping" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| GridClientSelectColumn clientSelectColumn = new GridClientSelectColumn(); |
| clientSelectColumn.HeaderText = "ChkColumn"; |
| clientSelectColumn.UniqueName = "ChkColumn"; |
| clientSelectColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left; |
| clientSelectColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left; |
| //clientSelectColumn.HeaderStyle.Width = Unit.Pixel(25); |
| rgSource.MasterTableView.Columns.Add(clientSelectColumn); |
| GridClientSelectColumn client2SelectColumn = new GridClientSelectColumn(); |
| client2SelectColumn.HeaderText = "Chk1Column"; |
| client2SelectColumn.UniqueName = "Chk1Column"; |
| client2SelectColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left; |
| client2SelectColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Left; |
| client2SelectColumn.HeaderStyle.Width = Unit.Pixel(25); |
| rgTarget.MasterTableView.Columns.Add(clientSelectColumn); |
| GridBoundColumn boundColumn = new GridBoundColumn(); |
| boundColumn.DataField = "SoftwareID"; |
| boundColumn.UniqueName = "Software1ID"; |
| boundColumn.HeaderText = "SoftwareID"; |
| rgSource.MasterTableView.Columns.Add(boundColumn); |
| GridBoundColumn bound1Column = new GridBoundColumn(); |
| bound1Column.DataField = "SoftwareID"; |
| bound1Column.UniqueName = "Software2ID"; |
| bound1Column.HeaderText = "SoftwareID"; |
| rgTarget.MasterTableView.Columns.Add(bound1Column); |
| GridBoundColumn bound3Column = new GridBoundColumn(); |
| bound3Column.DataField = "SoftwareName"; |
| bound3Column.UniqueName = "Software3Name"; |
| bound3Column.HeaderText = "SoftwareName"; |
| rgSource.MasterTableView.Columns.Add(bound3Column); |
| GridBoundColumn bound4Column = new GridBoundColumn(); |
| bound4Column.DataField = "SoftwareName"; |
| bound4Column.UniqueName = "Software4Name"; |
| bound4Column.HeaderText = "SoftwareName"; |
| rgTarget.MasterTableView.Columns.Add(bound4Column); |
| this.rgSource.MasterTableView.DataKeyNames = new string[] { "SoftwareID", "SoftwareName" }; |
| this.rgTarget.MasterTableView.DataKeyNames = new string[] { "SoftwareID", "SoftwareName" }; |
| List<Entities.SoftwareEntities.Software> targetSoftwarelist = (List<Entities.SoftwareEntities.Software>)Session["TargetDataSet"]; |
| List<Entities.SoftwareEntities.Software> sourceSoftwareList = (List<Entities.SoftwareEntities.Software>)Session["SourceDataSet"]; |
| for (int i = 0; i < tmpNumber; i++) |
| { |
| Entities.SoftwareEntities.Software software = new Entities.SoftwareEntities.Software(); |
| software.SoftwareID = e.DraggedItems[i].GetDataKeyValue("SoftwareID").ToString(); |
| software.SoftwareName = e.DraggedItems[i].GetDataKeyValue("SoftwareName").ToString(); |
| sourceSoftwareList.Add(software); |
| } |
| // Reorder the rows in both grids |
| targetSoftwarelist.RemoveAll(item => sourceSoftwareList.Find(sourceItem => sourceItem.SoftwareID == item.SoftwareID) != null); |
| sourceSoftwareList.Sort((first, second) => first.SoftwareID.CompareTo(second.SoftwareID)); |
| Session["TargetDataSet"] = targetSoftwarelist; |
| Session["SourceDataSet"] = sourceSoftwareList; |
| rgSource.MasterTableView.GetColumn("SoftwareID").HeaderText = "SoftwareID"; |
| rgSource.MasterTableView.GetColumn("SoftwareName").HeaderText = "SoftwareName"; |
| this.rgTarget.Rebind(); |
| this.rgSource.Rebind(); |
| <asp:DataList ID="ResultDataList" runat="server" Width="100%" > |
| <ItemTemplate> |
| <table width="100%"> |
| <tr> |
| <td> |
| <%#Eval("Question")%> |
| <asp:HiddenField ID="QuestionIDField" runat="server" Value='<%#Eval("QuestionID") %>' /> |
| </td> |
| </tr> |
| <tr> |
| <td > |
| <telerik:RadChart ID="RadChart1" runat="server" Width="500" Height="250" ChartTitle-Visible="false" CreateImageMap="false" DataGroupColumn="ColumnText"> |
| <PlotArea> |
| <XAxis DataLabelsColumn="OptionText"> |
| </XAxis> |
| </PlotArea> |
| </telerik:RadChart> |
| </td> |
| </tr> |
| <tr><td><hr /></td></tr> |
| </table> |
| </ItemTemplate> |
| </asp:DataList> |
| <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SurveyDBConnectionString %>" |
| SelectCommand="select optiontext,text,isnull((select COUNT(resultid) from SurveyResult where OptionID=SurveyOption.OptionID and ColumnID=ColumnOption.ColumnOptionID group by OptionID ),'0') as RespondentCount from SurveyOption,ColumnOption where SurveyOption.QuestionID=ColumnOption.QuestionID and SurveyOption.QuestionID= @QID"> |
| <SelectParameters> |
| <asp:Parameter Name="QID" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| Protected Sub ResultDataList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles ResultDataList.ItemDataBound |
| If (Not e Is Nothing) Then |
| Dim chart As RadChart = CType(e.Item.FindControl("RadChart1"), RadChart) |
| Dim h As HiddenField = CType(e.Item.FindControl("QuestionIDField"), HiddenField) |
| SqlDataSource2.SelectParameters(0).DefaultValue = h.Value |
| chart.DataSource = SqlDataSource2.Select(DataSourceSelectArguments.Empty) |
| chart.Legend.Appearance.GroupNameFormat = "ColumnText" |
| chart.DataBind() |
| End If |
| End Sub |