Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Using HistoryPoints in NET 3.5...

I can select the tab in the onnavigate event but since this event occurs AFTER the page_load
I am unable to trigger the server side TabClick event which loads the content of the tabs.

The content of each tab is a user control that is loaded by the TabClick event.  This event
is not been fired by the Ajax history onnavigate event.

The onnavigate event does fire the page_load BUT it does it before it executes and sets
the tab.selectIndex property.

Any suggestions/solutions would be most appreciated as usually :) 
Atanas Korchev
Telerik team
 answered on 27 Jul 2009
4 answers
119 views
I have the following:

<telerik:RadComboBox ID="healthNumberCmbo" runat="server" AllowCustomText="true" 
HighlightTemplatedItems="true" EnableLoadOnDemand="true" LoadingMessage="Loading ..." Height="250px" 
MarkFirstMatch="true" OnClientItemsRequesting="onClientItemsRequesting" 
OnClientItemDataBound="onClientItemDataBound"
     <WebServiceSettings Method="GetPatients" Path="Services/PatientAC.asmx" /> 
</telerik:RadComboBox> 
 
<!-- Client-side Data Template --> 
<div id="myTemplate" class="sys-template"
     <b>Name:&nbsp;</b>{{FullName}}<br />                  
     <b>DOB:&nbsp;</b>{{BirthDate.format("MM/dd/yyyy")}}<br />                               
     <b>HC#:&nbsp;</b>{{HealthNumber}} 
</div>

function onClientItemsRequesting(sender, eventArgs) 
    var context = eventArgs.get_context(); 
    context["filterString"] = eventArgs.get_text(); 
 
function onClientItemDataBound(sender, eventArgs) 
    var item = eventArgs.getItem(); 
    var dataItem = eventArgs.get_dataItem(); 
  
    // set the attributes that we can use when they select the item 
    item.get_attributes().setAttribute("healthNumber", dataItem.HealthNumber); 
    item.get_attributes().setAttribute("fullName", dataItem.FullName); 
    item.get_attributes().setAttribute("birthDate", dataItem.BirthDate); 
 
    // set the value to the ID of the patient 
    item.set_value(dataItem.PatientID); 
 
    var template = new Sys.UI.Template($get("myTemplate")); 
    template.instantiateIn(item.get_element(), dataItem); 

I've based my functionality off of the blog post here .. my issue is this:

When the user clicks to open the combo box, and it loads, and they use the UP and DOWN arrows on the keyboard, the text that gets set in the combo box is what was in the template for that item. 

How can I use the template, but at the same time - be able to only put the Health Number in the textbox. The reason is that we have clientside validation by using the CustomValidator - and for that to work before you select the item, the text in the box needs to be what i'm expecting. 

Case 1: What I currently get in the textbox when the user uses the UP/DOWN keys and doesn't press enter or leave the combo ...
Name: Some Guy DOB: 1/1/2009 HC#: 1234567890

Case 2: What I want in the textbox under that situation:
1234567890

I'm using a validation RegEx of "^\\d{10}$", which obviously isn't valid under Case 1 .. 

Help!
Simon
Telerik team
 answered on 27 Jul 2009
6 answers
212 views

I have implemented a custom FIleBrowserContentProvider successfully, and have it working with RadEditor.

Is there a way to cause the ImageEditor's Save functionality call a custom FileBrowserContentProvider?

Looks like the 'cannot write to folder' alert is getting hit in the _saveButtonClickHandler in ImageEditor.ascx:

 

var name = this.get_newImageName()+$get("NewImageExt").innerHTML;

 

 

if (!name || name.indexOf(separator) != -1)

 

{

alert(localization[

"MessageCannotWriteToFolder"]);

 

 

return;

 

}

I have not made any changes to any of this code.

Suggestions?

Laku
Top achievements
Rank 1
 answered on 27 Jul 2009
1 answer
115 views
Hi

I am generating a CSV file on the fly in my aspx page. RadCompression is giving me an error when processing is done and it is about to send a "application/octet-stream" content type to my page.

Here's my code.

                string strFileContent = sb.ToString(); // This is the CSV string generated 
 
                // EXPORT 
                string strFile = "export.csv"
                string ContentType = "application/octet-stream"
 
                Response.Clear(); 
                Response.ContentType = ContentType; 
                Response.AddHeader("Content-Disposition""attachment; filename=\"" + strFile + "\""); 
                Response.Flush(); 
                Response.Write(strFileContent); 
                Response.End(); 

I had to remove RadCompresstion from the web.config to get this working. Thanks.
Rosen
Telerik team
 answered on 27 Jul 2009
1 answer
95 views
All-
Are there any examples/help out there for this scenario?
I have a few tables that I am loading into some RadGrids for editing. 
A few of the columns are really lookup/reference table data.  The primary table has foreign keys over to the various reference tables.

I want to show the description(from the reference table) as a label in read-mode.  But when it goes to "Edit" mode, switch to boundCombo boxes to allow those lookup fields to be selected from the dropdowns.

Then on the "Update" submit the edited row back for updating. 

I am using an EF model for testing but also have some WCF services for the CRUD methods if I need them.

Any help would be great-
MJD
Sebastian
Telerik team
 answered on 27 Jul 2009
1 answer
88 views
Hi Telerik Team,
We are trying to make monthly chart in which series are being created Dynamically. On X-axis, we need to group chart with Months Name. I also tried your sample application and also following same steps in my application. But it shows me some inconsistant values (Mean it is not showing values according to proper months). I am selecting records using Linq Entity framework and keep them in Data Table. When i receive records in datatable, data is to be shown properly but when i pass this datatable to my Rad Chart control then it shows some inconsistant values. Can you please guide us that how we can solve this issue.

Regards,
Ascertia Team
Ves
Telerik team
 answered on 27 Jul 2009
1 answer
84 views
hello I've started look into nestedviewtemplates and have a couple of question

1. http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx in this sample, the sales grid consists of a detailview table. the sqldatasource has a sessionparameter. Now i Assume that the parenttablerelationship-settings do put the correct value inside there and that it should be asp:Parameter instead - because i cannot see where the session parameter is set.

2. My other question is how to achieve what is done in the nestedview sample programmatically?  Using the sqldatasources and binding to the hidden Label to use as ID and then use controlparameter seems pretty okay. But what if there's a scenario where i cannot use the parameterized datasources? I looked into the documentation and found the OnDetailTableDataBind event which i have successfully used to fetch data and bind it to detailtables, but how can it be done in nestedviewtemplates?

i haven't tested the sample extensively but i suppose the fact that nestedviewtemplate consists of tabstrips, detailviews etc adds to the complexity of databinding programmatically?
Mira
Telerik team
 answered on 27 Jul 2009
5 answers
153 views
Hi,

I have a WCF-bound grid that works fine. I have the user select one or more items, click a button, which opens a Window for editing. All this is fine. 

I have an event handler on closing of the window and in this I want to be able to update the grid with the changes. This, however, runs the code but does not retrieve the changes by calling the WCF service.

My JavaScript:

var grid = $find('<%=radGridDataGroups.ClientID %>'); 
var selItems = grid.get_masterTableView().get_selectedItems(); 
if (selItems.length == 0) { 
    radalert('Please select an item to edit and then try again.', 300, 100, 'Edit Data Group'); 
else { 
    for (var i = 0; i < selItems.length; i++) { 
        var w=migOpenDialog('~/secure/dialogs/system/EditDataGroup.aspx?dataGroupID=' + selItems[i].getDataKeyValue("DataGroupID"), 600, 600); 
        if (w) { 
            w.setActive(true); 
            w.set_modal(true); 
            w.add_close(function() { 
                alert('hello');  
                var masterTable = $find("<%=radGridDataGroups.ClientID %>").get_masterTableView(); 
                masterTable.rebind(); 
            }); 
            w.show(); 
        } 
    } 

So the 'hello' message is displayed (I have also put breakpoints in there). I have stepped through the $find call, which gets the grid and the rebind method appears to run, but nothing happens.

So how can I refresh a WCF grid based on changes?

Note: migOpenDialog is just a wrapper for your openWindow function.

Many thanks
Nathan J Pledger
Top achievements
Rank 2
 answered on 27 Jul 2009
3 answers
143 views
Hello,

How can i quickly add 5000 items to the list control on client side?

I can use the _addNewItems("", options) in RadComboBox, do you have any similar method in RadListBox control which allows to avoid creating RadListItem javascript objects one by one?

Thanks
Simon
Telerik team
 answered on 27 Jul 2009
4 answers
135 views
Hi

I have a grid which allows me to edit the row. Updating works fine. However when I use the itemupdated event handler the row does not update. The itemupdated eventworks fires fine though.

Is there something else I must do when I use the itemupdated event or is this a bug?

Thank you
Pavlina
Telerik team
 answered on 27 Jul 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?