Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
141 views
Is it possible to export only selected rows of a grid?
Daniel
Telerik team
 answered on 17 Nov 2009
1 answer
155 views
I have a problem with. Excel.format="ExcleML"

 

 


 


I don“t know why.
I was looking in the forum to find a solution, but nothing.

Do you have any ideas?

My escenerio:
.aspx

<

 

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>

 


.cs

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();

 

}


My result is this error:

Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderForm(HtmlTextWriter nullWriter, Control form) +864
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +8673113
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
   Telerik.Web.UI.Grid.Export.TableViewExporter.ExcelExportRenderPage(HtmlTextWriter nullWriter, Control page) +93
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +594
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +594
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
Daniel
Telerik team
 answered on 17 Nov 2009
1 answer
92 views
Hi, i found the auto complete combo box to be useful for my email form. (http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/autocompleteclientside/defaultcs.aspx)
However, as I have discovered that this function doesn't work correctly in chrome, but does for IE and firefox.
is there any fix possible for the future?
Simon
Telerik team
 answered on 17 Nov 2009
2 answers
145 views
I have the checkbox items in the listbox.
When the item is inserted into the  listbox, I want the checkbox to be automatically checked to be true.
However during the postback, the checked value is false on the serverside. How can I retrieve the value set by the client side?

Here is my code.

<

 

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>

 

yoomee kwon
Top achievements
Rank 1
 answered on 17 Nov 2009
1 answer
122 views
Hi. I am trying to access the value in a combobox. When the user clicks a LinkButton in the grid, I fire a command. Before the breakpoint i reached, I see the combobox resort back to the SelectedIndex of 0. Therefore, when the breakpoint is hit, the value is not the value selected by the user...

I tried both below, the grid is reloading PRIOR to me having a chance to retrieve the value and the combo value is already reset

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

 

Simon
Telerik team
 answered on 17 Nov 2009
3 answers
502 views
I have template column:

<telerik:GridTemplateColumn HeaderText="salary"><ItemTemplate>  
            <asp:TextBox ID="salary" runat="server"></asp:TextBox></ItemTemplate>  
</telerik:GridTemplateColumn>  

Now I want to change the text in textbox in each row - the text is number, so I want to multiply it by 3.

But I don't know how to get the value of TextBoxes in JavaScript code?

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;
}   

It gives me a "NaN" error, because the innerHTML returns me "<span ...> 3.423 </span>"  but not "3.423" for example.

Anyone can help me? The grid is not in edit mode. I have template column with textbox.


Sebastian
Telerik team
 answered on 17 Nov 2009
1 answer
133 views
Hi,

When i type letter in my combo box its take long time to load relevent data according to given letter. There is loading message. How can i speed up this loading

lakmal
Simon
Telerik team
 answered on 17 Nov 2009
3 answers
136 views
I am using v.2009 Q3 combobox and cannot seem to find a way to have (when typing into the combo box) filter through multiple fields while the combo box renders the items under items_requested.

For example I am having the user find inventory items and then select this item to edit and make changes. They need to be able to either type in the stock number or description to pull these items up. So I am displaying both the stock number and description within the combo box.

I set filtering to contains thinking it would look at both the stock number and description. My datatext  field is set to description so it is only searching / filtering through that one field.  Is there anyway to have the combo box filter or markfirstmatch through multiple fields?
 
I hope this make sense....


Thanks,

Simon
Telerik team
 answered on 17 Nov 2009
2 answers
177 views

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

Svetlina Anati
Telerik team
 answered on 17 Nov 2009
7 answers
123 views

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

Pavlina
Telerik team
 answered on 17 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?