Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
380 views
Hi

 I have 2 problesm with Image manager when implementing it in my application
I am using stand alone Image manager control without any editor control

1. I am setting all the DialogOpener properties in a class file and trying to use that in all the pages whereever i have my Image Manager but it i am not able to Invoke the ImageManager Javascript function

Below is the code snippet used in seperate class file and invoking the method from Code behind
public class Teleril_Controls
{

 

public static void GetImageManagerProperties(DialogOpener DialogOpener)

 

{

 

try

 

{

 

FileManagerDialogParameters imageManagerParameters = new FileManagerDialogParameters();

 

 

string[] strDocumentPath = new string[1] { <<Image Path>>};

 

imageManagerParameters.ViewPaths = strDocumentPath;

imageManagerParameters.UploadPaths = strDocumentPath;

imageManagerParameters.DeletePaths = strDocumentPath;

imageManagerParameters.MaxUploadFileSize = 5000000;

 

// If you don't set the following property, the default value will be used

 

 

// imageManagerParameters.SearchPatterns = new string[] { "*.jpg" };

 

Telerik.Web.UI.

DialogDefinition imageManager = new Telerik.Web.UI.DialogDefinition(typeof(ImageManagerDialog), imageManagerParameters);

 

imageManager.ClientCallbackFunction =

Telerik_Constants.ImageManagerFunction;

 

imageManager.Width =

Unit.Pixel(694);

 

imageManager.Height =

Unit.Pixel(440);

 

 

//If you need to customize the dialog then register the external dialog files

 

 

//imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";

 

DialogOpener.DialogDefinitions.Add(

Telerik_Constants.ImageManagerFunction, imageManager);

 

}

 

catch (Exception ex)

 

{

}
}
}

Javascript in (.aspx) page

 

<

 

script language="javascript" type="text/javascript">

 

 

 

 

 

 

function ImageManagerFunction(sender, args)

 

{

 

var selectedItem = args.get_value();

 

 

var txt = $get('<%= txt_Image.ClientID %>');

 

 

if ($telerik.isIE)

 

{

txt.value = selectedItem.outerHTML;

//this is the selected IMG tag element

 

 

 

 

 

 

var strPath = args.value.getAttribute("src",2);

 

 

var img = document.getElementById('Image Tag Name');

 

img.src = strPath;

 

var hField = document.getElementById('Hidden Field to store the image');

 

hField.value = strPath;

 

var strImagename=strPath.split("/");

 

 

if(strImagename.length-1!="")

 

txt.value=strImagename[strImagename.length-1];

}

 

else

 

{

 

var path = args.value.getAttribute("src",2);

 

txt.value =

"<img src='" + path + "' />";

 

}

}

 

</script>

 

 

Calling the above method from Code behind file

Telerik_Controls.GetImageManagerProperties(ImgDialogOpener

);
Is  this the right way to Call the DailogOpener properties (or) It can be only be invoked from Code Behind.


2. I am able to open the Image Manager if i have all the properties set in code behind file without calling it from common class file but if the image folder is huge with 1000 or 2000 images it is not trying to Load the images, I am not sure if that is  because of the image folder size (or) because of the path specified.
But i am able to access the image manager when i specify a folder with 15 or 20 images

Your earliest help and suggestions are appreciated.

Regards,
Bose Thirumalai


 

Lini
Telerik team
 answered on 22 Jun 2009
1 answer
113 views
Hi everyone,

I am creating a combobox, and set the text on the basis of items selected.
Combobox is shared amongs variouse dynamic tabs.
My problem is , "Whenever a combobox has empty text in one Tab, the same combobox on another tab shows the empty text although its not. I am setting the Text every time, i have debegged my code. on server side , during debugging it shows the value is set. but again in client side it shows the empty message if set or blank text if empty message is not set."

Thanks,
Nitin
Veselin Vasilev
Telerik team
 answered on 22 Jun 2009
1 answer
71 views
Hi all

Just downloaded asp.net ajax controls demo and now my VS2005 studio debugger stopped working....Any ideas???

Craig T..
Bruno
Top achievements
Rank 2
 answered on 22 Jun 2009
1 answer
73 views
I am getting following error frequently where ever i have used Rad Controls. What is the cause of this?

"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

What is the resolution to overcome this?
Princy
Top achievements
Rank 2
 answered on 22 Jun 2009
3 answers
201 views
Sorry for the repeat question.  I am new with Ajax and for some reason I'm just not understanding the other posts.

I have a RadAjaxManager on a content page that updated a RadGrid.  I have a search textbox on my Master Page that I want the grid to respond to, but I can't figure out how to hook it up.

Can somebody explain how I can do this?  Again, I'm sorry for the repeat questions, but like I said I am new with Ajax and am having problems comprehending the other posts.
Iana Tsolova
Telerik team
 answered on 22 Jun 2009
1 answer
133 views
Hi All --

I've implemented a solution very, very similar to this one:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectrowwithcheckbox/defaultcs.aspx

With a few exceptions, such as I removed the header Select All and the select/unselect command buttons.  And I'm using client scrolling instead of paging, but I am still loading all (50 or so) records at once -- no virtual scrolling or anything.

This all works perfectly as advertised...Until... I move the scroll bar on the grid up or down (even just a little) -- and on my next postback (like clicking the checkbox), I've lost all the previously selected items and only the one I just selected remains selected.

I can select all the items that are in my current scroll window just fine, but the minute I move the scroll bar, they're gone on postback.

This doesn't happen if I remove the code below:

<

 

ClientSettings>

 

 

<Scrolling AllowScroll="True" ScrollHeight="400px" UseStaticHeaders="true">

 

 

</ClientSettings>

 


And let the grid grow.

Any suggestions?

Thanks

Troy
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2009
0 answers
126 views
Hi , 
       i have one buton in panel items.

<

asp:Button ID="btn1" runat="server" Text="Click me" OnClientClick="return Valdate();"  OnClick="btn1_Click" />

 


When i click on button it goes to client side function and validate the fields.
My function returns true and false depends upon the validation.
if i retrun True it it dosent fires to severside
 btn1_Click event.
if i put the button outside the panel it works fine.
here is sample code 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%">

 

 

<telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="SingleExpandedItem" Width="100%" >

 

 

<Items>

 

 

<telerik:RadPanelItem Expanded="True" Value="RegistrationInformation1" style="font-weight:bold" Text="Step 1: User Information" runat="server" Selected="true">

 

 

<Items>

 

 

<telerik:RadPanelItem Value="RegistrationInformation" runat="server">

 

 

<ItemTemplate>

 

 

<asp:Table ID="tblRegistration" BackColor="#eeeeee" Width="100%" runat="server" >

 

 

 

</asp:Table>

 

 

<table width="100%">

 

 

<tr>

 

 

<td align="right">

 

 

<asp:Button ID="btn1" runat="server" Text="Click me" OnClientClick="return Valdate();" OnClick="btn1_Click" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<CollapseAnimation Duration="100" Type="None" />

 

 

<ExpandAnimation Duration="100" Type="None" />

 

 

</telerik:RadPanelBar>

 

I am reffering same example .Here is following link.

http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/accessingnestedcontrols/defaultcs.aspx

Thanks
Shrirang


Shrirang
Top achievements
Rank 1
 asked on 22 Jun 2009
1 answer
88 views

Hi,

How i can able to display the title of the rad sliding pane as mention below.

M
O
N
T
H

Righ now i cant able to display the title like this. Can any one help me to tell how i can able to achieve this.?

Thanks and Regards,
Sushanth Mathew
Svetlina Anati
Telerik team
 answered on 22 Jun 2009
1 answer
65 views
As the topic says I want to find a way to have only one opened node at every level.
Any ideas guys?
Thank you very much!
Stavros
Top achievements
Rank 1
 answered on 22 Jun 2009
1 answer
56 views
Hi all,

I am using soe paging. and using item template to simulate listview. the porblem is that when change page from the initial page the layout will change the width become small. actaully for the initial page: page.aspx and page.aspx?page=1 will display different width. 

any suggestion?

TIA

Jerry
 
Pavlina
Telerik team
 answered on 22 Jun 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?