or
<asp:ObjectDataSource ID="ObjectDataSourceLookUpValues" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="Select" TypeName="Epsi.Segmentation.WebApp.DataSource.ObjectDataSourceAttrLookUpValues"> <SelectParameters> <asp:Parameter Name="attrEntityDto" Type="Object" /> </SelectParameters></asp:ObjectDataSource><telerik:RadComboBox ID="RadComboBoxStringInLookupValue" Runat="server" Width="325px" AllowCustomText="True" CausesValidation="False" EmptyMessage="<%$ Resources:CommonUserMsg, EnterValueMsgResource %>" EnableTextSelection="False" DropDownWidth="325px" HighlightTemplatedItems="True" OnClientDropDownClosing="OnClientDropDownClosing" OnClientDropDownClosed="DropDownClosed_PopulateInComboBoxEmptyMessage" > <ItemTemplate> <ul> <li class="col1"> <telerik:RadListBox ID="RadListBoxSource" runat="server" Height="125px" AutoPostBack="False" DataSourceID="ObjectDataSourceLookUpValues" DataTextField="Descr" DataValueField="Code" AllowTransfer="true" TransferToID="RadListBoxDestination" SelectionMode="Multiple" AllowTransferOnDoubleClick="True" AutoPostBackOnTransfer="True" OnTransferring="RadListBoxSource_Transferring" OnClientSelectedIndexChanged="IndexChanged" ondatabound="OnDataBound" onitemdatabound="OnItemsDataBound" ontransferred="RadListBoxSource_OnTransfered" TransferMode="Move" > <ButtonSettings TransferButtons="Common"></ButtonSettings> </telerik:RadListBox> </li> <li class="col2"> <telerik:RadListBox ID="RadListBoxDestination" runat="server" Height="125px" SelectionMode="Multiple" oninserted="RadListBoxDestination_AddItemToList" oninserting="RadListBoxDestination_Inserting" AllowDelete="True" TransferMode="Move"> </telerik:RadListBox> </li> </ul> </ItemTemplate> <Items> <telerik:RadComboBoxItem Text="" /> </Items> </telerik:RadComboBox><telerik:GridTemplateColumn HeaderStyle-Width="195px" DataField="Shipregistry" HeaderText="Skipsregister" SortExpression="Shipregistry" UniqueName="Shipregistry"> <ItemTemplate><%#DataBinder.Eval(Container.DataItem, "Shipregistry")%></ItemTemplate> <EditItemTemplate> <telerik:RadComboBox DataTextField="Shipregistry" DataValueField="Shipregistry" ID="ShipregistryComboBox" HighlightTemplatedItems="true" EmptyMessage="Velg et element..." AllowCustomText="true" runat="server" Height="50px" Width="95px" SelectedValue='<%#Bind("Shipregistry") %>' AutoPostBack="true"> <Items> <telerik:RadComboBoxItem runat="server" Text="norsk" Value="NOR"/> <telerik:RadComboBoxItem runat="server" Text="internasjonalt" Value="NIC"/> </Items> </telerik:RadComboBox> <asp:RequiredFieldValidator runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ShipregistryComboBox" ID="RequiredFieldValidator2"></asp:RequiredFieldValidator> </EditItemTemplate><HeaderStyle Width="195px"></HeaderStyle> </telerik:GridTemplateColumn> protected void RadGridFerryReg_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem && e.Item.DataItem is Ferry) { var item = e.Item as GridDataItem;
var ferry = e.Item.DataItem as Ferry;
item["Shipregistry"].Text = ferry.Shipregistry == "NOR" ? "norsk" : "internasjonalt";
} }
var radRotatorItemData = [];
radRotatorItemData.Html =
"<a href='' style='margin-left:10px'>" + DAF + "</a>";
rotator.addRotatorItem(radRotatorItemData, 0);
|
<telerik:RadGrid runat="server" ID="Grid_Statistik" AllowMultiRowEdit="false" Skin="Office2007" GridLines="None" PageSize="20" AllowPaging="true" DataSourceID="Grid_Statistik_DataSource" AllowSorting="true" ShowStatusBar="true" > <ExportSettings FileName="File" OpenInNewWindow="True"> <Pdf PaperSize="A4" PageHeight="210mm" PageWidth="297mm" /> </ExportSettings> <GroupPanel ID="GroupPanel" Text="Gruppierungsfläche"> </GroupPanel><%----%> <MasterTableView Name="Grid_Statistik" runat="server"DataSourceID="Grid_Statistik_DataSource" AutoGenerateColumns="false" PageSize="20" AllowPaging="true" AllowMultiRowEdit="false" AllowFilteringByColumn="True"> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns><telerik:GridBoundColumn HeaderText="Employee" UniqueName="Employee" DataField="Employee" DataType="System.String" ReadOnly="True"> <FilterTemplate><%--DataSourceID="MA_Source" DataTextField="nameKomplett" DataValueField="hr_m_personal_id" --%> <telerik:RadComboBox id="cbx_MA" runat="server" Skin="Office2007" OnLoad="cbx_MA_Load" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("Employee").CurrentFilterValue %>' OnClientSelectedIndexChanged="EmployeeIndexChanged"><%----%> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function EmployeeIndexChanged(sender, args) { var tableView = $find(<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
tableView.filter("Employee", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> <HeaderStyle Width="250px" /> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling ScrollHeight="415px" AllowScroll="True" UseStaticHeaders="true" /> </ClientSettings> <PagerStyle AlwaysVisible="true" /> <HeaderContextMenu EnableTheming="True"> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </HeaderContextMenu> <FilterMenu EnableTheming="True"> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </FilterMenu> </telerik:RadGrid>| <telerik:RadGrid ID="gvSearchTelerik" runat="server" |
| OnItemCreated="gvSearchTelerik_ItemCreated" |
| EnableAjaxSkinRendering="false" |
| AllowSorting="True" |
| AllowPaging="True" |
| PageSize="15" |
| GridLines="None" |
| Width="100%" |
| AllowFilteringByColumn="True" |
| DataSourceID="sqlSearchDevice" |
| HeaderStyle-Wrap="false" |
| HeaderStyle-Width="150px" |
| ShowGroupPanel="True" |
| ShowStatusBar="true"> |
| <MasterTableView CommandItemDisplay="Top"> |
| <CommandItemTemplate> |
| <asp:ImageButton ID="bXls" runat="server" |
| OnInit="bXls_Init" |
| OnPreRender="bXls_PreRender" |
| OnClick="bXls_Click" |
| style="margin:3px 2px 1px 2px" |
| SkinID="ExportToExcel"/> |
| </CommandItemTemplate> |
| <Columns> |
| <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" |
| HeaderText="MojeIdecko"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> |
| <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" > |
| <Excel FileExtension="xls" Format="ExcelML" /> |
| </ExportSettings> |
| <ClientSettings AllowDragToGroup="True" |
| AllowColumnsReorder="true" |
| ReorderColumnsOnClient="true"> |
| <Scrolling AllowScroll="True" |
| UseStaticHeaders="True" |
| SaveScrollPosition="true" |
| FrozenColumnsCount="1" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| protected void bXls_Click(object sender, ImageClickEventArgs e) |
| { |
| gvSearchTelerik.ExportSettings.ExportOnlyData = true; |
| gvSearchTelerik.ExportSettings.IgnorePaging = true; |
| gvSearchTelerik.ExportSettings.OpenInNewWindow = true; |
| gvSearchTelerik.MasterTableView.ExportToExcel(); |
| } |
| protected void gvSearchTelerik_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item is GridCommandItem) |
| { |
| ImageButton ibExportToExcel = (e.Item as GridCommandItem).FindControl("bXls") as ImageButton; |
| this.RegisterPostbackControl(this, ibExportToExcel); //this function just registers input control // via ScriptManager placed on the MasterPage |
| } |
| } |