Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
113 views
I have a .NET page that has a RadRotator on it, displaying a series of images.  I also have a "Refresh" button that, when pressed, uses a RadAjaxManager to look for more images to display, and if found, adds them to the RadRotator.  This all works beautifully.

However, I have a second component that is causing issues.  My RadRotator has a "Previous" and "Next" button that I control from code.  When these buttons are pressed they trigger the RadRotator to rotate, and then display a brief text explanation of the current image elsewhere on the page.  Both of these actions are achieved through Javascript: the rotator using the Client-Side API, and the text using an .innerHtml replace on an asp:Label.  The actual text comes from a Javascript array that I set the contents of using a <%= %> code block on page load.

Here's the problem: I can't get RadAjaxManager to update the code block so that the javascript array contains an updated list of text explanations at the same time that more images are bound to the RadRotator.

Possible Solutions:
1.  Find some way to get RadAjaxManager to re-evaluate a block of javascript code containing an ASP.NET code block (Preferred)
2.  Move the array of text explanations out of javascript and into some variable in the code-behind, then trigger a partial callback ever time the Previous/Next buttons are clicked to access it (Not preferable, because the Javascript solutions never has to contact the server)

I tried setting the RadAjaxManager to target the RadCodeBlock that my Javascript is contained in to see if that would work, no luck with that.

Any insight is appreciated, and have a happy New Year!
Mira
Telerik team
 answered on 03 Jan 2012
1 answer
144 views
Sir;

I am using telerik grid control. and i want to add grid on click of button. and then drag and drop rows from other grid controls on page to dynamically created grid control.

whenever i add grid dynamically and try to drag and drop i got this error.
Can u please suggest why this problem is coming.

Thanks and regards
raman singla

Script controls may not be registered after PreRender.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Script controls may not be registered after PreRender.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Script controls may not be registered after PreRender.]
   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +432555
   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +92
   Telerik.Web.UI.RadCompositeDataBoundControl.RegisterScriptControl() +72
   Telerik.Web.UI.RadCompositeDataBoundControl.ControlPreRender() +33
   Telerik.Web.UI.RadGrid.ControlPreRender() +118
   Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) +47
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
Mira
Telerik team
 answered on 03 Jan 2012
3 answers
160 views
I need to show expand icon against each node as the child nodes(if any) would be populated on demand. I dont want to use Load on demand directly, because our application can have more than 4000 child nodes(around 50000-100000). 
Is there any way by which the child nodes will have the expand icon without keeping the expandmode=webservice, so that when the user expands the node, on client side the ajax request will fire and will bring the child nodes and keep appending it on regular intervals(or through webworkers in case of html5).
Bozhidar
Telerik team
 answered on 03 Jan 2012
3 answers
97 views
Hi,
i am performing transfer among 7 radlistboxs on OnClientDropped event using "transferManager.performTransfer" method in javascript .

 

<script id="ListBoxItemTransfer" type="text/javascript">

 

function lbdropped(sender, args) {

sender.trackChanges();

 

var destinationListBox = transferManager.performTransfer(sender, args);

sender.commitChanges();

 

//Call back function

 

var senderListboxId = sender.get_id();

 

if (senderListboxId == 'rlbFuncImprovement' || senderListboxId == 'rlbTechImprovement' || senderListboxId == 'rlbConsolidation') {

 

var objectIds = '';

 

var items = args.get_sourceItems();

 

var i = 0;

 

for (i = 0; i < items.length; i++) {

 

if (objectIds == '') {

objectIds = items[i].get_value();

}

 

else {

objectIds = objectIds +

 

',' + items[i].get_value();

}

}

 

var arrgument = senderListboxId + ',' + objectIds + ", 0";

CallServer(arrgument,

 

'');

}

}

 

//Multi-list box transfer generic code

(

 

function ($) {

transferManager =

 

function () { }

transferManager.performTransfer =

 

function (sender, args) {

 

var destinationItemIndex = this._getDestinationIndex(args);

 

var destinationListBox = this._getDestinationListBox(args);

 

if (destinationListBox == null || destinationListBox.get_id() == document.getElementById('rlbProposed').id)

 

return;

 

var reorderIndex = args.get_dropPosition() == 0 ?

destinationItemIndex : destinationItemIndex + 1;

 

var items = args.get_sourceItems();

 

this._transfer(items, destinationListBox, reorderIndex);

 

return destinationListBox;

}

transferManager._transfer =

 

function (items, destination, reorderIndex) {

$.each(items,

 

function (index, item) {

destination.trackChanges();

destination.get_items().insert(reorderIndex, item);

destination.commitChanges();

});

}

transferManager._getDestinationIndex =

 

function (args) {

 

var destinationItem = args.get_destinationItem();

 

if (destinationItem)

 

return destinationItem.get_index();

 

return 0;

}

transferManager._getDestinationListBox =

 

function (args) {

 

var destinationItem = args.get_destinationItem();

 

if (destinationItem) {

 

var id = destinationItem.get_listBox().get_id();

 

return $find(id);

}

 

var parent = $(args.get_htmlElement()).parent();

 

if (parent.is(".RadListBox")) {

 

var id = parent[0].id;

 

return $find(id);

}

 

else if (parent.is(".rlbGroup")) {

 

var id = parent[0].parentNode.id;

 

return $find(id);

}

 

return null;

}

})($telerik.$);

 

</script>



I want that First listbox do the copy item functionality to other listbox, whereas other listboxs do the move item functionality.
How can i achieve this?
Bozhidar
Telerik team
 answered on 03 Jan 2012
9 answers
132 views
all I need is for a simple edit form to have columns instead of being one too long coluns. but when I use this:
<EditFormSettings ColumnNumber="2" >
                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                    Width="100%" />
                <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                <EditColumn ButtonType="ImageButton" UpdateText="Update record"
                    UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSetting

thank you.
regina
Top achievements
Rank 1
 answered on 03 Jan 2012
2 answers
625 views

I am creating a radtreeview context menu with an item 'Open link in new tab'.

I have created a context menu server side and assigned it to all nodes, but problem is I need to set the NavigateURL property of the context menu and this is different for every node.

I tried using the OnClientContextMenuItemClicked and then tried using Window.Open in the javascript function:

function

ContextMenuClicked(sender, args) {

  window.open(args._node._properties._data.value,

'_blank');

}
This function get the value property of the treeview node where the URL is stored, but unfortuanetely this doesn't work because it is stopped by the IE popup blocker.

I suppose I could create a unique context menu for every single node - but there might be hundreds of nodes and I worry this would make things slow.

Please can you think of a way I can solve this problem?

Many thanks for your help

 

richard
Top achievements
Rank 1
 answered on 03 Jan 2012
3 answers
88 views
Hi!...
some days ago, telerik send me a solution for show slidepane on the right opent to Bottom.
This works perfectlly in FF but no in IE.

In FF:






in IE:




How I can Fix this?
Thanks!
Dobromir
Telerik team
 answered on 03 Jan 2012
3 answers
82 views
In Firefox, any/all absolutely elements, background is always white when editing. See below example. Is there a way to override this behavior so that the element's background is preserved, especially in the case of transaparent?

<div style="background-color:silver;height:300px;width:300px;padding:20px;">
  <div style="position:absolute;height:200px;width:200pxcolor:white;">
    Hello World
  </div>
</div>

In a RadEditor, when you click on the words Hello World to edit them the editable area background becomes white thus the white words become unreadable. I would like the editable area to remain transparent so the silver color shows as the background. Is this possible? 

Rumen
Telerik team
 answered on 03 Jan 2012
3 answers
101 views
When a Rad Window appears, the entire page reloads. That should not happen. 
This is happening for all Rad Windows
Richard
Top achievements
Rank 1
 answered on 03 Jan 2012
1 answer
125 views
Hi,
Is there a way to do the following:
a. color the day in Timeline view, we wanted to color blue if it is a public holiday for that day
b. Freeze the Date header in timeline view, we wanted to freeze the Date row when we want to scroll bottom. Our RADSchedule is very long thus user unable to see the Date header.

Thanks.

Regards,
CH
Ivana
Telerik team
 answered on 03 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?