<
asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Export" />
<
telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" FooterStyle-HorizontalAlign="Right" AllowFilteringByColumn="False" AllowSorting="true" ShowFooter="True" runat="server" Skin="MyCustomSkin" EnableEmbeddedSkins="false" OnSortCommand="RadGrid1_SortCommand" OnItemDataBound="RadGrid1_ItemDataBound" OnCustomAggregate="RadGrid1_CustomAggregate">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true">
</Scrolling>
<Resizing EnableRealTimeResize="True" AllowColumnResize="True"></Resizing>
<ClientEvents OnGridCreated="GridCreated" />
</ClientSettings>
<MasterTableView Width="100%" CommandItemDisplay="Top" ShowGroupFooter="true" DataKeyNames="Estado">
<CommandItemSettings AddNewRecordText="" ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToWordButton="true" />
<SortExpressions>
<telerik:GridSortExpression FieldName="Descripcion" SortOrder="Ascending" />
</SortExpressions>
<Columns>
<telerik:GridBoundColumn DataField="Descripcion" SortExpression="Descripcion" HeaderText="Descripcin" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FechaHora" SortExpression="FechaHora" HeaderText="FechaHora" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IdOrdenador" SortExpression="IdOrdenador" HeaderText="NCaja" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Nombre" SortExpression="Nombre" HeaderText="Cajero" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" ></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PrecioUnitario" SortExpression="PrecioUnitario" HeaderText="Precio U." HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" DataFormatString="{0:###,###,##0.00}" UniqueName="PrecioUnitario" Aggregate="Custom"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Cantidad" SortExpression="Cantidad" HeaderText="Cantidad" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" DataFormatString="{0:####0}" UniqueName="Cantidad" Aggregate="Custom"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Total" SortExpression="Total" HeaderText="Total" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false" DataFormatString="{0:###,###,##0.00}" UniqueName="Total" Aggregate="Custom"></telerik:GridBoundColumn>
</Columns>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldAlias="Descripcin" FieldName="Descripcion" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="Descripcion"/>
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
</telerik:RadGrid>
protected void Button1_Click(object sender, EventArgs e)
{
RadGrid1.ExportSettings.ExportOnlyData =
true;
RadGrid1.ExportSettings.OpenInNewWindow =
false;
RadGrid1.ExportSettings.Excel.Format = Telerik.Web.UI.
GridExcelExportFormat.ExcelML;
RadGrid1.MasterTableView.ExportToExcel();
}
<
script language="javascript" type="text/javascript">
function AddItems(strDay, strDate, strType1, strType2) {
var list = $find("<%= lstDFSummary.ClientID %>");
var items = list.get_items();
list.trackChanges();
var item = new Telerik.Web.UI.RadListBoxItem();
var item2 = new Telerik.Web.UI.RadListBoxItem();
item.set_text(strDay + " , " + strDate + " - " + strType1 + " " + "<%= strShowName %>");
item.set_checked(
true);
items.add(item);
list.commitChanges();
}
</
script>
Dim
dataItem As GridDataItem
dataItem =
DirectCast(e.Item, GridDataItem)
Dim ddl As Telerik.Web.UI.RadComboBox
ddl =
DirectCast(dataItem.FindControl("ddlTest"), Telerik.Web.UI.RadComboBox)
Dim qty As String = ddl.SelectedItem.Text
Dim qty2 As String = ddl.Text
Dim ddlQty As DropDownList
ddlQty =
DirectCast(dataItem.FindControl("ddlQuantity"), DropDownList)
Dim value As String = ddlQty.SelectedItem.Text
Dim value2 As String = ddlQty.Text
| <telerik:GridTemplateColumn HeaderText="salary"><ItemTemplate> |
| <asp:TextBox ID="salary" runat="server"></asp:TextBox></ItemTemplate> |
| </telerik:GridTemplateColumn> |
| var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView(); |
| |
| for(var row = 0; row < masterTable.get_dataItems().length; row++) |
| { |
| var salary = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "profit").innerHTML; salary.innerHTML = salary.innerHTML * 2; |
| } |
hi
i am using Latest Telerik RadControls for ASP.NET AJAX Q2 2009 SP1
When I open the ImageManager managers they appear behind the RadMenu. I have adjusted the z-index on the RadMenu
.RadMenu_Dynamics_Context
{
background: none;
border:0;
z-index:8000 !important;
}
but the result is the same.
Thanks and regards
Vivekanandan.R
Hi,
We are trying to export the self hierarchical RAD grid in to an excel.The problem is, we are not able to export the detail table contents when the grid is collapsed.our requirement is , if we click the export all button all the grid details should be exported irrespective of master and detail table contents also whether it is expanded or collapsed.Also while exporting, the column header for detail tables should not be exported.
the code we have used in button click event is
RadGrid1.MasterTableView.Columns.FindByUniqueName("ClaimID").Visible = false;
RadGrid1.MasterTableView.Columns.FindByUniqueName("ExportClaimID").Visible = true;
RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.ExportSettings.IgnorePaging = true;
RadGrid1.Rebind();
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.MasterTableView.ExportToExcel();
please can any one tell me the solution for this issue.
Quick solution/response will be appreciated.
Regards,
Bharath