Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
Hi,
I have a RadGrid that I use to Export to Excel. I was surprised at how easy it was to do it. I just added the code below and it worked fine.
My question is...Does this rely on Excel being installed on the server or is this going to happen on the client side because it works on my machine but I want to know if it will work if I upload to my web hosting company and I know that most web hosting companies do not allow Microsoft Office on the web server for security reasons.

Thanks
Rob

Private

 

Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click

 

 

ConfigureExport()

radMonthlyCommissions.MasterTableView.ExportToExcel()

 

 

End Sub

 

 

 

Public Sub ConfigureExport()

radMonthlyCommissions.ExportSettings.ExportOnlyData =

True

 

 

 

radMonthlyCommissions.ExportSettings.IgnorePaging =

True

 

 

radMonthlyCommissions.ExportSettings.OpenInNewWindow =

True

 

End Sub

 

 

Kevin Wood
Top achievements
Rank 1
 answered on 06 Jun 2010
4 answers
325 views
Hallo,

I´m using a radcombobox together with an objectdatasource. The combobox is placed within the edititemtemplate of a formview. The objectdatasource has "enablecaching", the combobox "EnableItemCaching" set to true.

 

<asp:ObjectDataSource ID="ODS_Country" runat="server" EnableCaching="True" 
    
SelectMethod="GetData"

 

 

    TypeName="Telerik.DataSet1TableAdapters.REF_CountryTableAdapter">

 

 

</asp:ObjectDataSource>

 


 

<telerik:RadComboBox ID="rcb_Country" Runat="server" 
    
DataSourceID="ODS_Country"
    
DataTextField="Country" DataValueField="OID" 
    
EnableItemCaching="True" >

 

 

</telerik:RadComboBox>

 


But everytime I switch formview to editmode there is access to my database. How can I achieve, that the item data of the combobox are only read once from my db using caching mechanism of objectdatasource.

Thank´s for your help.
Robert
Robert
Top achievements
Rank 1
 answered on 05 Jun 2010
1 answer
177 views
Hi:

I have a hierarchical radgrid which I'm capturing some client events and all of them other than expand/collapse are working ok. Child data is loading ok too, through RadAjaxManager object. The only problem is that expand/collapse events are not being fired. Could someone post the right code to hook-up these events??? This is what I'm doing:

in the rad grid client settings:
<ClientSettings Scrolling-AllowScroll="false" Selecting-AllowRowSelect="true" AllowExpandCollapse="true"
                    ClientEvents-OnRowSelecting="rgCon_OnRowSelecting"
                    ClientEvents-OnRowSelected="rgCon_OnRowSelected"
                    ClientEvents-OnRowDeselected="rgCon_OnRowDeselected"
                    ClientEvents-OnHierarchyExpanded="rgCon_OnHierarchyExpanded"
                    ClientEvents-OnHierarchyCollapsed="rgCon_OnHierarchyCollapsed">
                </ClientSettings>

in the javascript file:
rgCon_OnRowSelecting: function(sender, args){
        alert(1);
    },
    
    rgCon_OnRowSelected: function(sender, args){
        alert(2);
    },
    
    rgCon_OnRowDeselected: function(sender, args){
        alert(3);
    },
    
    rgCon_OnHierarchyExpanded: function(sender, args){
        alert(4);//not firing
    },
    
    rgCon_OnHierarchyCollapsed: function(sender, args){
        alert(5);//not firing
    },


thanks in advance
Princy
Top achievements
Rank 2
 answered on 05 Jun 2010
1 answer
137 views
Hi
I have a RadComboBox using load on demand with web service.  However I found that the event OnClientItemsRequested is not fired after the combobox get its data from web service.  The online example uses EnableLoadOnDemand and DataSource control but not web service.  Will OnClientItemsRequested be fired if using web service?  If not, what should I do if I need to run some client code after the combobox get populated.

Regards
Edwin
Edwin
Top achievements
Rank 1
 answered on 05 Jun 2010
1 answer
143 views
I've got a listbox populated from my database, and want to change the RadListBoxItem.Checked property (check or uncheck) whenever a user clicks anywhere on a row.  Is there an easy way to do this?
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2010
3 answers
288 views

I have a page with one radgrid on it.  This page contains different sets of columns depending on how the user gets to the page.  In all cases the grid offers Grouping.  Since I cannot declare the columns ahead of time and I allow the user to group by whatever he/she chooses, how can i get specific columns to show aggregates in the group footers when grouping is active?

I can get footers to contain text by doing something simple like:

    Protected Sub Radgrid_ItemDataBound(ByVal source As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
        If TypeOf e.Item Is GridGroupFooterItem Then  
            Dim footer As GridGroupFooterItem = e.Item  
            Try  
                footer("ReworkCosts").Text = "Sum of Rework Costs: $" 
            Catch ex As Exception  
            End Try  
            Try  
                footer("MaterialCosts").Text = "Sum of Material Costs: $" 
            Catch ex As Exception  
            End Try  
            Try  
                footer("ScrapCosts").Text = "Sum of Scrap Costs: $" 
            Catch ex As Exception  
            End Try  
            Try  
                footer("DefectCosts").Text = "Sum of Defect Costs: $" 
            Catch ex As Exception  
            End Try  
            Try  
                footer("QNote").Text = "Count of Qnotes: " 
            Catch ex As Exception  
            End Try  
            Try  
                footer("MRCs").Text = "Count of MRCs: " 
            Catch ex As Exception  
            End Try  
            Try  
                footer("SCARs").Text = "Count of SCARs: " 
            Catch ex As Exception  
            End Try  
        End If  
    End Sub 

...but I don't know how to access all of the items in a specific column of that group so that I can add/count them and concatenate themm to the end of my string.

Any recommendations?

I am using VB.NET, .NET 3.5

Shinu
Top achievements
Rank 2
 answered on 05 Jun 2010
1 answer
74 views
So what I'm trying to do should be very basic, but seems unnecessarily difficult with the radgrid. All I am doing is binding the grid server-side, and need to conditionally set a column to "readonly" if certain criteria is met by the item's dataitem. So my question is how do you set a single item's column to readonly in the ItemDataBound event?

protected void gridFavorites_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item.DataItem != null) 
        { 
            IFavorite fav = (IFavorite)e.Item.DataItem; 
            if (fav.CmsPageId == Guid.Empty) 
                // Where to go from here to set readonly=true? 
        } 
    } 

Shinu
Top achievements
Rank 2
 answered on 05 Jun 2010
4 answers
325 views
Hey all,

I want to use a radgrid without a data source, just to be able to for my customers to enter in line items for creating invoices.  I want it to be able to add rows by using ajax, and then loop through after the data entry and insert to my sql db... i cant seem to figure out how to use the grid by default to be a data entry form rather than a data display form.
Elliott
Top achievements
Rank 2
 answered on 04 Jun 2010
4 answers
162 views
Hi

Is there a way to set the display of a grid row to look as if it is selected without using set_selected()?

I have a grid which I am populating on the client.  When the user selects a row, I am populating other controls via a RadAjaxPanel (therefore a postback).  When the control finishes the postback, the row is no longer selected, so I am storing the index of the row that was selected and during the RadAjaxPanel_OnResponseEnd, I am attempting to reselect the row using set_selected.  Works great, except that that fires the event which is causing an indefinite loop of postbacks.

I was hoping that there is a way on the client to set the style of the row to look selected without using set_selected(), hopefully avoiding the problem described above.

This gets me my selectedrow (on the client)
$find("<%= grdEntityAttributes.ClientID %>").get_masterTableView().get_dataItems()[document.getElementById("selectedRow").value] 

Any ideas?
Michael Pullella
Top achievements
Rank 1
 answered on 04 Jun 2010
2 answers
221 views
Hi,

I have a RadGrid with an Hyperlink column that when clicked opens a new IExplorer window that shows a web page with information related to the row.

I want to control what the new opened IExplorer window shows. Like hide the menu bar, status bar, enable/disable resizing and the like.

I understand that the way to go is using javascript function window.open(). Now since I am using the RadGrid Hyperlink column with the property "Target= _blank",  my question is:

Where I suppoese  to inser the javascript string to call the new window set up as I want it?
or
Is there any other method or best practice to accomplish this in the context of Telerik RadGrid component?

Any advice would be appreciated.
Willy Vidable
Top achievements
Rank 1
 answered on 04 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?