Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
342 views
In my application, I have a RadGrid with similar functionality as:

http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx#qsf-demo-source

However, I am using ObjectDataSources and referencing a SelectMethod instead of a query to get data.  Example:

<asp:ObjectDataSource SelectMethod="GetDetails"
              TypeName="Details"
              ID="DataSource2"
              runat="server"
              OnSelecting="DataSource2_Selecting">

My problem is that the GetDetails method takes an ObjectId (as a string) to retrieve data for that row item.  Is it possible to fire an event on the expansion of a node (in the grid) so that I can grab it's ObjectId field (column in the grid) and pass it to the method?

Using the OnSelecting parameter, I am able to specify a static string ObjectId:

protected void DataSource2_Selecting (object sender, ObjectDataSourceSelectingEventArgs e)
{
    e.InputParameters["ObjectId"] = "00000000-0000-0000-0000-00000000";
}


However, I need this to be more dynamic and somehow (either through a hidden field, lookup of some kind, etc), find which row's node was expanded, and use that ObjectId, instead of the current static string.
Neil
Top achievements
Rank 1
 answered on 31 Jan 2013
3 answers
208 views
The RadEditor control does not seem to be loading any of its css or js. 

I am getting a failed to load resource for Telerik.Web.UI.WebResource.axd. I believe the issue is that I am hosting an asp.net site within a subfolder. 

Here is my web.config code from my subfolder:

<configuration>
  
  <appSettings>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
  </appSettings>
  <system.web>
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
      <remove name="RadCompression" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
    </modules>
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    </handlers>
  </system.webServer>
</configuration>

I have already marked my subfolder as an application on my host server. Any ideas how to resolve this issue?

Zeyad
Rumen
Telerik team
 answered on 31 Jan 2013
14 answers
292 views
How can I have a Year View in the view tab,or a MultiMonthView? I know there is a MultiDayView, but that's not what I want.
Plamen
Telerik team
 answered on 31 Jan 2013
2 answers
200 views
When I click on edit button od rad grid. The edit item template of radgrid has update and cancel buttons side by side. I want those auto generated buttons in two new line. 

example :

it appears 

Update    Cancel

I want

Update
Cancel

Can any body suggest me . thank you
S
Top achievements
Rank 1
 answered on 31 Jan 2013
1 answer
73 views
    i have created radwindow in javascript using the following code.
    window.radopen("companyadd.aspx", "AddCompanyDialog");
    the pop up is open perfectly but when i right click on  the the newly open window in I.E 8 (Internet Explorer 8)  to see the print preview it shows the parent page in preview. Ideally it should show the newly created popup page in print preview. request you to please help me out from this problem. this works in normal window.open() javascript function.

Thanks & Regards,
Mobashir
Daniel
Telerik team
 answered on 31 Jan 2013
3 answers
613 views
I have created my RadGrid and have exporting to Excel working well when the user clicks on an export button in their browser.

I have also used the code below to make it so that the Excel file can be saved programatically without bringing up the file save dialog.  This code is also working well.

Now, what I need to do is automate and schedule this process:   the creation of the grid, the firing off the export to Excel function, and saving that exported Excel file to a directory on the web server.  In order to accomplish that, I created a windows application that would sit on the same web server and would call the web page that contains the grid.   That works fine.

The problem that I have is that I don't know how to fire the GridExporting event without using some client side interaction or client-side javascript.   I am using an HttpWebRequest in my windows application to make the web request, but HttpWebRequest doesn't support javascript, so it can't trigger the GridExporting event.

Is there anyway to call the GridExporting event from the server-side and not the client-side?   If so, during what event should I make that call from and what does that call look like?

I know that as an alternative, I could totally skip using RadGrid, and for these automated exporting calls, simply take my raw data and create an excel sheet programatically using NPOI or some other tool and save it.   The issue is that I will still be using RadGrid on the web, and I have built the web application so that the data in the grid can be customized significantly by my users (through sorting, grouping, hiding columns, etc), and I really want the programatically created Excel file to provide the same data, in as close to the same format, as if the user used the RadGrid's export to Excel function on the website.  

It seems that I am very close to making that happen, if I can just figure out how to trigger the export function on the server-side.

Thanks in advance for your help!


This is the code that I am using to save the Excel file programatically without bringing up the file save dialog.  This code is working great.
Protected Sub RadGrid1_GridExporting(sender As Object, e As Telerik.Web.UI.GridExportingArgs) Handles myGrid.GridExporting
        'This handler saves the file DIRECTLY to the server directory without showing the save as dialog
             
            path = Server.MapPath("~/MyFile.xls")
 
            Dim fs As FileStream
            fs = File.Create(path)
 
            Dim info As Byte()
            info = System.Text.Encoding.Default.GetBytes(e.ExportOutput)
            fs.Write(info, 0, info.Length)
            fs.Close()
 
            Response.Redirect(Request.Url.ToString(), False)
 
    End Sub
Daniel
Telerik team
 answered on 31 Jan 2013
2 answers
174 views
Hi,

How can I disable the title on the content area?
I have a title said: Rich text editor with ID...

I'm using the div mode.

As you can see in this demo, there is the title also:
http://demos.telerik.com/aspnet-ajax/editor/examples/contentareamodediv/defaultcs.aspx
Attila
Top achievements
Rank 1
 answered on 31 Jan 2013
3 answers
175 views
Is there a way to get FormDecorator to style custom controls i have on my page? They are just modified DropDownList controls but the FormDecorator doesn't pick them up.
Danail Vasilev
Telerik team
 answered on 31 Jan 2013
3 answers
178 views
Hello,

I have a search function on every page. The way this works is that a button is pressed the Master page catches the button press and then redirects to a "suche.aspx" page.

On updating the Telerik dll this has stopped working in IE8. IE8 tries to download a file.

What I think causes the problem is at some point an extra "Response header" is added, "Content-encoding: gzip", so that there are now two, which confuses the browser (but not IE9 or Firefox -- FF renders the header as "Content-encoding: gzip, gzip" but accepts it).

The answer seems to be to use Response.ClearHeaders() before the redirect (or turning off postback compression, which worked when this problem was confined to a couple of pages and I could use the "excludeHandler" for those) .

I am hesitant, however, as a previous DLL required the removing of Response.ClearHeaders() for IE8 to work and I thought it best to get clarification as to the best practice here.

Thank you

Paul Herzberg
Martin
Telerik team
 answered on 31 Jan 2013
1 answer
140 views

I output RadGrid to Excel <Excel Format="Html"></Excel>

Here are my issues; (I have attached a picture to help illustrate my questions)

 

  1. Is there a way to know what row the Grid is currently writing to in Excel? Something like "Excel.CurrentRowNumber"?

Reason: I'm writing formulas to various cells during RadGrid1_ExcelExportCellFormatting but the first row of data it encounters gets written to Excel row 4 (because of the Grid Header). I tried using item.ItemIndex but that starts off at 0 (or 1 maybe, i don't recall). So my formulas are all messed up since I don't know what the current row in Excel is. I need to write out formulas like C4+D4 but I end up with C1+D1.
The problem gets worse as  GroupByExpressions are encountered. Each time my data is grouped another 2 rows get written to Excel and now my current row is off by even more.

2. Is there a way to interact with the output to Excel when GroupByExpressions are encountered? I'd like to adjust the cells during that time such as inserting formulas to sum up all the rows in a section for each column. Same question regarding the GridFooterItem..? I'd like to put "grand total formulas" in those various columns.

3. I can't get rid of column A. There is a blank column that gets written out (see my picture). It seems to be known as "column" so I tried hiding it such as:

RadGrid1.MasterTableView.GetColumn("column").Display = false;

but no luck. This is only a minor annoyance, I could live with this as the formula questions above are the more important showstoppers.

Thank you!!

Daniel
Telerik team
 answered on 31 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?