Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
168 views
Hi there,
Hoping someone can help me out with a problem I am having.
I have an aspx page which contains a placeholder which I use to display usercontrols.
My aspx contains a RadAjaxPanel and my placeholder is inside the panel. I have set the panels 

 

ClientEvents-OnRequestStart="conditionalPostback" and I have added some js

 

 

function conditionalPostback(sender, e) {

 

 

 

var uploadButton = new RegExp("\.btnInsertStolenItem$", "ig");

 

 

// var upload = $find(window['radUploadImages']);

 

 

 

 

 

//var upload = $find('<%=radUploadImages.ClientID %>');

 

 

 

 

 

if (e.get_eventTarget().match(uploadButton)) {

 

 

// if (upload.getFileInputs()[0].value != "") {

 

 

 

 

e.set_enableAjax(

false);

 

 

// }

 

 

 

 

}

 

}

My problem is with my var upload. My aspx cant find radUploadImages (which I understand as it hasn't been loaded yet :)) however I dont know what to change to only set the var if the usercontrol has been loaded....

Hope this makes sense as I am really stuck.

If anyone could provide help I would be most grateful.

Daniel
Telerik team
 answered on 08 Dec 2008
4 answers
588 views
Hi,

I am in process of coding a three level hierarchy grid with client side hierarchy mode.I need to get data from DB on button click for some filter criteria and bind results to grid.

I wish to call the NeedDataSource and DetailsTableDataBind [this is called after needdatasource event is fired] event on button click to avoid error in JS method when hierarchy mode is CLIENT which says index out of bound.

 

 

 

function

 

ExpandFirstDetailTableFirstItem()

 

{

$find(

"<%= RadGrid1.Items[0].ChildItem.NestedTableViews[0].ClientID %>").expandItem(0);

 

}

 

 

function CollapseFirstDetailTableFirstItem()

 

{

$find(

"<%= RadGrid1.Items[0].ChildItem.NestedTableViews[0].ClientID %>").collapseItem(0);

 

}

 

 

 



I am looking following example on button click and and not on page load so tha NeedDatasource event is called after button click event is fired.

regards,

Parimal

 

 

 

 

 

 

 

Sebastian
Telerik team
 answered on 08 Dec 2008
1 answer
88 views
I get the following error when I try to run spell check in any browser except IE:

Could not find target HTML element. Please verify that ControlToCheck/ControlsToCheck points to valid HTML controls.

I am using the "ControlsToCheck" property of the RadSpell control and passing in the ClientID of all the textboxes to check (therefore I am setting "IsClientID" to true). I check the values that are in the ControlsToCheck array, and they do appear in the HTML source.

Any ideas?
Lini
Telerik team
 answered on 08 Dec 2008
1 answer
147 views
Hello,
i'm working with style yet (RadSkinManager and Radformdecorator) and i have two questions:

1- I have a multiview associated with a tabstrip and i would like the background color of the selected view was the same that the selected tab. How can i do that?
now , i do like this....but it's not good enough :-)
//

document
.getElementById("RadMultiPage1").getAttribute("style").background=document.getElementById("RadFormDecorator1").currentStyle.scrollbarTrackColor;  

//

2- how can i have all the color palette associated with a style selected with 
i use this for have some but, i'm sure there is another way (perhaps named color ?)

       document.getElementById(

"Form1").currentStyle.[color property....]

Thank's a lot for your help

 

 

 

 

 

 

Peter
Telerik team
 answered on 08 Dec 2008
3 answers
140 views

Hi

In the previous version of RadEditor it was possible to use a config file. Like this: ConfigFile="~/RadControls/Editor/ConfigFile.xml" 

I can’t get this to work with the Q2 version. Is it still possible to use a config file or use web.config to set max upload file size, valid suffix and upload paths etc?

Rumen
Telerik team
 answered on 08 Dec 2008
1 answer
167 views
Hi All!

I have the following problem:
I wrote a Generic class called Demo. It has three properties (get, set) and has LoadAll and Update functions from/into database.

List<Demo> demo = IDemoFactory.LoadAll(); //gives all the items from a table.

In RadGrid NeedDataSource event:
radGridDemo.DataSource = demo;

and now what I need to know how can I do:
I change the properties of the selected (edited) object and run Update Command -> radGridDemo_UpdateCommand(object source, GridCommandEventArgs e) fired. and I need my edited Custom Demo object somehow in the following way.
Demo demo = e.Item.DataItem as Demo;
IDemoFactory.Update(demo);

Is it possible to do on the way mentioned above or I need to set the edited properties on a Demo type object and than i need to give it to my Update function?
I have 40 properties and hard to do...
I have the same question about InsertCommand.

I hope U understand my question.
thanks,
g.
Rosen
Telerik team
 answered on 08 Dec 2008
1 answer
59 views
We use MOSS 2007 and moved our content to a new server and installed Rad Editor on it. The editor is working on new Rad Editor web parts but not in lists - either new ones or in the old wikis that we have on the site. It seems that the default MOSS editor is being used. I have activated the web part as the default editor for list items but it doesn't seem to be working (even though it was working on the old server).

Does anyone know why this would be happening?

Thanks,
Sam
Stanimir
Telerik team
 answered on 08 Dec 2008
1 answer
88 views
I have a datepicker on a page that is in a radajaxpanel. The page is a content page with a RadAjaxManagerProxy and the ajaxmanager is on the master page.

When I select a date from the datepicker it makes my page jump to the top. I thought it was autopostback, but as you can see from the markup I have two pickers with autopostpack set and not set and it still does it for both.

I have tried adding an ajaxsetting on the datepicker control to update both the panel and the datepicker. Nothing seems to work.

Any help on this?

<div> 
 <telerik:RadDatePicker ID="dateHoldDate" Runat="server" AutoPostBack="false" MinDate="01/01/1900" Width="100" Skin="Office2007" CssClass="Calendar" Calendar-TitleStyle-CssClass="CalendarTitle" Calendar-HeaderStyle-CssClass="CalendarHeader" DateInput-CssClass="CalendarInput" Calendar-ShowRowHeaders="false" />            
</div>        
<div> 
 <telerik:RadDatePicker ID="dateAssignedDate" Runat="server" MinDate="01/01/1900" Width="100" Skin="Office2007" CssClass="Calendar" Calendar-TitleStyle-CssClass="CalendarTitle" Calendar-HeaderStyle-CssClass="CalendarHeader" DateInput-CssClass="CalendarInput" Calendar-ShowRowHeaders="false" />            
</div>   

Georgi Krustev
Telerik team
 answered on 08 Dec 2008
1 answer
113 views
Is there a way to resize the dialog that pops up when doing Paste as Plain Text?  We use the Editor inside an iFrame of set size, and when the Paste dialog pops up it's both too big and not centered vertically. 
Rumen
Telerik team
 answered on 08 Dec 2008
5 answers
124 views
Hello

i am getting this "Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method"
 javascript error.when scrolling the the scrollbar of radgird for ajax. please give a look of the code

 

<telerik:RadCodeBlock ID="rcb" runat="server">  

 

<script type="text/javascript">  

 

var loadedMoreRecords = false;  

 

 

function HandleScrolling(e)

 {

 

 

var grid = $find("<%=gdPropertyList.ClientID %>");   

 

 

var scrollArea = document.getElementById("<%=gdPropertyList.ClientID%>" + "_GridData");  

 

 

var totalRecords=<%=totalPropertiesCount %>;  

 

 

if(IsScrolledToBottom(scrollArea))  

{

loadedMoreRecords =

true;  

 

 

var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);

 

//if the presently visible items are less than the entire source records count  

 

//trigger an ajax request to increase them  

 

if(currentlyDisplayedRecords < totalRecords)  

{

$find(

"<%=radAjaxManger.ClientID %>").ajaxRequest("LoadMoreRecords"); }

 

} 

 

else  

 

 

{loadedMoreRecords =

false;  }}

 

 

//this method calculates whether you have reached the bottom when dragging the vertical grid scroll

 

 

function IsScrolledToBottom(scrollArea)  

 

{ 

 

var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;  

 

 

return loadedMoreRecords ? false :(currentPosition == scrollArea.scrollHeight); 

}

</

script> 

 

 

</telerik:RadCodeBlock>
<telerik:RadAjaxManager ID="radAjaxManger" EnableAJAX="true" runat="server" OnAjaxRequest="radAjaxManger_AjaxRequest">

 

<ajaxsettings>  

 

 

<telerik:AjaxSetting AjaxControlID="radAjaxManger">  

 

 

<UpdatedControls>  

 

 

<telerik:AjaxUpdatedControl ControlID="gdPropertyList" LoadingPanelID="radAjaxLoadPnl" />  

 

 

</UpdatedControls>  

 

 

</telerik:AjaxSetting> </ajaxsettings>  

 

 

</telerik:RadAjaxManager> 

<

telerik:RadAjaxLoadingPanel ID="radAjaxLoadPnl" runat="server" MinDisplayTime="20" Transparency="25">  

 

 

<img style="margin-top: 250px" alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' style="border: 0;" />  

 

 

</telerik:RadAjaxLoadingPanel> 

 

 

<telerik:RadGrid ID="gdPropertyList" EnableEmbeddedSkins="false" Width="100%" OnItemDataBound="gdPropertyList_ItemDataBound"PagerStyle-BorderWidth="0" runat="server" GridLines="None" ShowHeader="False" OnNeedDataSource="gdPropertyList_NeedDataSource" Skin="" AllowPaging="True" PageSize="10" 

 

 

AutoGenerateColumns="False" EnableEmbeddedBaseStylesheet="False" EnableTheming="False" GroupingEnabled="False" ShowDesignTimeSmartTagMessage="False"> <mastertableview tablelayout="Fixed"> 
<Columns>  

 

 

<telerik:GridBoundColumn DataField="ListingRKey" UniqueName="Id" Visible="false">  

 

 

</telerik:GridBoundColumn>  

 

 

<telerik:GridTemplateColumn> <ItemTemplate>  

 

 

<div id="listviewdiv" class="msnprop listpageborder"> 

 

 

<img id="viewImg" style="vertical-align: bottom;" visible="false" runat="server" src="include/images/checkedImage.gif" alt="View the property" /> 
<%# string.Concat("&pound;",Convert.ToDecimal(Eval("Price")).ToString("N"))%>&nbsp;<%# Eval("Road")%>, 
<%
# Eval("[SecSubdiv]")%> <%# !string.IsNullOrEmpty(Eval("SecSubdiv").ToString()) ? "," : ""%> <%# Eval("[Postcode]")%</span>
div class="msnprop listdetailsDiv">

 

<span style="color: #4582b0; font-size: 13px; font-weight: bold"> <%#((int)Eval("Bedrooms")!=0 )?"<img alt='beds' onload='fixPNG(this)' src='"+ string.Concat( ReadConfiguration.ImagesPath,"bedIcon.png")+"'/>&nbsp;"+ Eval("Bedrooms") +"&nbsp;&nbsp;" : ""%>

 <

%#((int)Eval("Bathrooms") != 0) ? "<img alt='bathrooms' onload='fixPNG(this)' src='" + string.Concat(  

 

 

ReadConfiguration.ImagesPath,"bathIcon.png")+"'/>&nbsp;"+ Eval("Bathrooms") +"&nbsp;&nbsp;" : ""%>  

 

 

</span><span style="color: #333;">  

<%

# Eval("Description")%> </span>

 

 

</ItemTemplate> </telerik:GridTemplateColumn> </Columns> </mastertableview> <validationsettings enablevalidation="False" />  

 

 

<pagerstyle visible="False" /> 

 

 

<clientsettings enablepostbackonrowclick="false" allowexpandcollapse="False" allowgroupexpandcollapse="False">  

 

 

<Scrolling AllowScroll="true" SaveScrollPosition="true" ScrollHeight="778px" /> <Selecting EnableDragToSelectRows="False" />

 

<ClientEvents OnScroll="HandleScrolling" /> <Resizing ClipCellContentOnResize="False" /> </clientsettings> </telerik:RadGrid>  

 

 

 

pleae provide a solution as soon as possible we have to deploy the code .

 

 

 

 

 

 

akshya
Top achievements
Rank 1
 answered on 08 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?