Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
462 views
I have seen plenty of forum thread but none of them, even the current ones, supply a resolution to exporting to Excel 2007 using the "XLSX" extension. 

I am using the Ajax Q1 release for 2011 and ASP.Net 4.0 assemblies.  What do I need to change here to export a grid to an xlsx file??

RadGrid1.MasterTableView.ExportToExcel()

I have tried added the following to the RadGrid export settings before call the export method but get a file format or extension is invalid exception:

RadGrid1.ExportSettings.Excel.FileExtension = "xlsx"

Daniel
Telerik team
 answered on 08 Apr 2011
6 answers
184 views
Hi,

I'am trying now to focus a particular textbox when the user click the edit button.

I found this very helpful thread on your support base, but it doesn't work (javascript approach) if my grid is ajaxified.

What is the solution ?

Thanks in advance.
Sean
Top achievements
Rank 1
 answered on 08 Apr 2011
1 answer
47 views
Hi

We are currently using ASP.NET ImageMap to display dynamically generated images, that have hotspots, in our web app, which also uses Telerik ASP.NET AJAX controls extensively.

ASP.NET ImageMap control requires that the image file be a physical file sitting in our web app folders and you specify the URL to that file.  This requires that we need to create temp files and manage them - deleting etc.

To avoid creating those 'physical files' and use in-memroy images, I realize we can cache the image and write a HTTP handler that can stream the image from that cache. 

Before I sit down and write my own handler...

I was wondering if we can pile onto the Telerik.Web.UI.WebResource that does similar work for Telerik's resources.  Does it expose any functionality where we can tell it say - here is the image stream, that is in this cache, serve this image when the request is made in certain fashion for the image resource?

Any pointers appreciated.

Regards
Athadu
Athadu
Top achievements
Rank 1
 answered on 08 Apr 2011
2 answers
98 views
Hi all,

I have a radgrid with two template columns i use to show the data instead of database ids, but when i run it ,it only shows the headers of the template columns not the data. What could be the reason?

Regards,
Hamda
HL
Top achievements
Rank 1
 answered on 08 Apr 2011
2 answers
215 views
Hi,

I have a Radgrid and using a telerik:GridBinaryImageColumn.
I've hooked up the Radgrid to a SqlDataSource allowing Automatic INSERTS/UPDATES/DELETES.
My table has a column "Logo" which is of "image" type and allows nulls.

If I create a record and upload an image everything is fine. But when I click update and update a different field for example "name", then the image gets deleted because I never selected one! So every time I update I have to select an image, and I'm sure you can see that that is a problem.

Any help would be great thanks.
Darren
Can
Top achievements
Rank 1
 answered on 08 Apr 2011
2 answers
352 views
Sirs:
I'm trying to code server side validation like you document here:
http://www.telerik.com/help/aspnet/grid/grdvalidation.html
under the 'Adding a validator to EditItemTemplate of GridTemplateColumn' section.

I'm trying to get the code to use a ValidationSummary control so I can show a more detailed error message at the top of the grid. Is this possible?



Steve Gray
Top achievements
Rank 1
 answered on 08 Apr 2011
2 answers
116 views
I'm creating a couple of datepickers programatically and I'm adding them to Panel object. I'm trying to add an attribute to the datepickers when they're created to run a JavaScript that opens the calendar when the input box of the date picker is clicked. This works great for datepickers that I've created on the client side and add this attribute server side, but when I create the datepickers server side, I'm not getting the full ClientID.

here is how I'm creating the datepickers and setting the attributes:
Panel edpanelContent = new Panel();
edpanelContent.Attributes.Add("class", "popupcontent");
RadDatePicker eddp = new RadDatePicker();
eddp.ID = "dp_ENDDATE";
eddp.DateInput.Attributes["onclick"] = String.Format("showPopUp('{0}');", eddp.ClientID);
edpanelContent.Controls.Add(eddp);

when I look at the page source, it's referencing the ID being passed to the JavaScript as just "dp_ENDDATE" without all the other pathing that goes along with it. The client id should look like this
ctl00_MainContent_ctl00_RadGrid2_ctl00_ctl02_ctl02_dp_ENDDATE_dateInput_text

Is there a way to set this up so I can assign the JavaScript to the DateInput server side when the control is created? Thanks.
Philip Senechal
Top achievements
Rank 1
 answered on 08 Apr 2011
1 answer
104 views
Hello All,
In my codebehind I set the sqldatasource controls filterExpression based on selecting items.

So when the page load I use the sqldatasource and bring back all records, when the user selects "sold Items" I use the sqldatasources FilterExpression to bring back just the "Sold Items" this works just fine, but when I page to the next page all my record show and not just the "Sold Items".

So each time they select an item, I add a diffent filter to the sqldatasource and then I set teh grids DataSourceID to my sqldatasource control then do a grid DataBind();

Like I said it works fine, except when I page to the next page, it's like the filter is removed and is gets everything as if there was no filter, but it should have not gotten everything in the first place because of the filter on the sqldatasource.

How can I fix this,
Thanks,
KS.
Pavlina
Telerik team
 answered on 08 Apr 2011
1 answer
123 views
Hi,

We are currently using a RadListbox in our software as follow:

<telerik:RadListBox ID="MyListBox" runat="server" OnItemDataBound="BindMyItems" EnableDragAndDrop="false" AutoPostBackOnReorder="true" 
AllowReorder="true" OnReordering="ReOrderMyItems" ViewStateMode="Disabled">
<ItemTemplate>
<telerik:RadTextBox ID="MyTextBox" runat="server" />
</ItemTemplate>
</telerik:RadListbox>


My challenge is, when the RadTextBox has got focus and we press shit+ctrl+ <- (back arrow) for selecting the text in the RadTextBox the RadTextBox are removed from the RadListBox. We have a client KeyPress event on the RadTextBox that is added in the codebehind. When this combination of keys are pressed the KeyPress event is triggered, but I get the ctrl key and then the shift key and that is it. It seems like I am not able to catch the combination of the keypress and therefore I am struggling a bit preventing the RadTextBox from being removed

This is how I add the KeyPress event in the codebehing, I am adding it in the BindMyItems(); For IE I am using onkeydown and other browsers I am using onkeypress.
Code behind adding of attribute : MyTextBox.Attributes.Add(lBrowser.Browser == "IE" ? "onkeydown" : "onkeypress", "return MyKeyPressEvent(this, event)");


My Question is, is there a way of catching this keypress combination to prevent this from happening?

Kind Regards,
David.
Helen
Telerik team
 answered on 08 Apr 2011
1 answer
135 views
Hi,

We are using version 2010.2.826.35 of the ASP.NET for AJAX components.

Q.  I want to be able to create a custom attribute key / value on each TimeSlot in server side code, and then access that custom attribute in javascript when the time slot is clicked.  If it matters, my Scheduler will only be displayed in Monthly View.

On the server I have:
Private Sub DployRadScheduler_TimeSlotCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.TimeSlotCreatedEventArgs) Handles DployRadScheduler.TimeSlotCreated
  
    e.TimeSlot.Control.Attributes.Add("divName", "week1")
  
End Sub

I don't know how to retrieve that Attribute in javascript when the user clicks on the timeslot.  I already have the javascript function in place to handle the OnClientTimeSlotClick event, but I can't seem to get the object that contains the attribute.

Any ideas?  Or is there another way to do this?  Basically, in Month View, I just want to know what week they clicked in, within the current Scheduler (where the Scheculer is always displaying 5 weeks...).

By the way, I do see that my Attribute and Value are getting written into the source of the HTML, but I obviously don't want to try to navigate through the DOM to find the one that corresponds to the timeslot I clicked.

Thanks In Advance.

 

Peter
Telerik team
 answered on 08 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?