Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
233 views
Hi,

I am working in Rad Editor and trying to implement different functionality which make my application user friendly.
Let me explain what I need to know from you.

I have one Editor.aspx page and it has RadEditore and Linkbutton call ImageGallery. When I click on ImageGallery, it opens one popup windows with Images. Once I select Image (by clicking on Select link on PopUP), I am passing that Image path to my Editor.aspx page through session.I made Dynamic Image control also. 

----------------------Editor.aspx.cs ---------------------------------------------
 string strPAth = Convert.ToString(Session["strPath"]);
 Image img = new Image();
 img.ImageUrl = strPAth ; 
                                                         // Is there any way I can add image here like RadEditor1. (insert or something) ???
StringBuilder sb = new StringBuilder();
sb.Append("OnClientLoad('" + strPAth  + "')");
ClientScript.RegisterClientScriptBlock(this.GetType(), "OnClientLoadScript",
 sb.ToString(), true); 

----------------------Javs Script on Editor.aspx---------------------------------------------
<script type="text/javascript">    
function OnClientLoad(imgPath)   
{   
        var nod=document.createElement("img");
        nod.src = imgPath;
        document.getElementById("RadEditor1ContentHiddenTextarea").appendChild(nod);  // Its not working...Getttin Error. document.getElementById() null or not found.
}   
</script>

Now Which function I shoud write so I will get that image in my RadEditor ? Eevery time Editor.aspx page get refreshed when I select Image from popUp WIndow. And it should allow me to add multiple Images from POpUp.

Looking for your help. Its urgent.

Thanks
Dipsa
Rumen
Telerik team
 answered on 13 Jul 2009
1 answer
235 views
Here's the scenario...

I have a RadGrid (i.e. "rgPermissions") that has a DetailsView and is set to Inline edit mode.  I only want one row expanded at a time, so I wrote the following:

        protected void rgPermissions_ItemCommand(object sender, GridCommandEventArgs e)  
        {  
            if (e.CommandName.Equals("ExpandCollapse"))  
            {  
                if (Session["curExpanded"] != null)  
                {  
                    rgPermissions.MasterTableView.Items[Convert.ToInt32(Session["curExpanded"])].Expanded = false;  
 
                    if (e.Item.ItemIndex == Convert.ToInt32(Session["curExpanded"]))  
                    {  
                        e.Canceled = true;  
                        Session.Remove("curExpanded");  
                    }  
                    else 
                        Session["curExpanded"] = e.Item.ItemIndex;  
                }  
                else 
                {  
                    Session["curExpanded"] = e.Item.ItemIndex;  
                }  
            }  
            else if (e.CommandName.Equals("RebindGrid"))  
            {  
                Session.Remove("curExpanded");  
            }  
        } 

This works fine.

However, let's say I expand row 1 and click "Add New" in the details view.  Of course, the edit form in the details view displays on the first line.  Now, if I expand row 2 in the RadGrid, row 1's details view collapses and row 2's expands.  Finally, if I expand row 1 again, row 1's details view expands and row 2's collapses accordingly, BUT row 1's details view is STILL in InsertMode.

How do I manually cancel the insert mode of the details view?  I exhausted every way I know.

Thanks.
Joshua
Shinu
Top achievements
Rank 2
 answered on 13 Jul 2009
1 answer
92 views
Is there a property for the RadDatePicker that prevents dates in the past from being selected or do I have to set the MinDate property to the system date programmatically on the server side?

John
Daniel
Telerik team
 answered on 13 Jul 2009
7 answers
694 views
Hi guys,
I have a radupload control in my page. Basically, is the same control showed in telerik sample but I would like to hide add/delete buttons that appears within the control (and the remove button as well).
Is there any way to do that ?

Thanks in advance,

François.
Dejan
Top achievements
Rank 1
 answered on 13 Jul 2009
1 answer
127 views
i have using telerik rad asp.net ajax controls after designed my site,i m trying to publish my website,
After opening the siteusing any browser ,it shows
Can u help how to make my site to run,plz help me!!!!

      The XML page cannot be displayed

Cannot view XML input using XSL style sheet.Please correct the error and then click the Refresh button, or tryagain later.


A name was started with an invalidcharacter. Error processing resource 'file:///C:/Documents andSettings/Karthik/My Docum...

<%@ page language="C#" autoeventwireup="true" inherits="_Default, App_Web_mkfrcish" %>-^





Paul
Telerik team
 answered on 13 Jul 2009
1 answer
80 views

Hi

Delete the appoinment from scheduler which event i need to fire.
When i click the X mark right side of my appoinment  which event i need to fire to wright a code to delete from database.



regards
Vairamuthu
Shinu
Top achievements
Rank 2
 answered on 13 Jul 2009
1 answer
61 views
Hi,

Can i know how to get the first row always selected in radgrid. ( in the postback i need to set it) .
When user opens the user control(or web form), we need to always have the first row selected.
How do i do this?

Pls help

Thanks,
ZR
Shinu
Top achievements
Rank 2
 answered on 13 Jul 2009
1 answer
109 views

protected

 

void RADGrid_ItemDataBound(object sender, GridItemEventArgs e)

 

 

 

{

 

 

 

if (e.Item is GridDataItem)

 

{

 

GridDataItem dataItem = e.Item as GridDataItem;

 

 

 

if (dataItem["UserName"].Text.Trim() == "Jeff")

 

 

 

 

 

dataItem["Delete"].Visible = false;

 

 

 

}

 

 

 

}

}

the unique columns are both template columns

 

 

Shinu
Top achievements
Rank 2
 answered on 13 Jul 2009
0 answers
131 views
Hi

I have developed the applicaion, i downloaded the code from forum that when i click insert appointment
it shold show the day view but it is giving ajax request error the code is

test.aspx
------------------------

<%

@ Page Language="C#" CodeBehind="Test.aspx.cs" AutoEventWireup="false" Inherits="AMS.Web.LMS.Test" %>

 

<%

@ Register Assembly="Telerik.Web.UI, Version=2009.1.527.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

 

 

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

 

<head>

 

 

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

 

 

<title>Boom</title>

 

 

 

</head>

 

 

<body bgcolor="aliceblue">

 

 

<script type="text/javascript">

 

 

function

 

OnClientTimeSlotClick(sender, eventArgs)

 

{

sender.showInsertFormAt(eventArgs.get_targetSlot());

 

}

function

 

onClientTimeSlotContextMenu(sender, eventArgs)

 

{

alert(

"sorry no operations");

 

}

//function OnClientRecurrenceActionDialogShowing(sender, eventArgs)

 

//{

 

 

//eventArgs.set_cancel(true);

 

 

//Edit this instance only:

 

 

//eventArgs.set_editSeries(false);

 

 

//Edit the entire series:

 

 

//eventArgs.set_editSeries(false);

 

 

//}

 

 

</

 

script>

 

<

 

form id="Form1" runat=server>

 

 

&nbsp;<%--

 

<asp:Label ID="Label2" runat="server" Style="left: 431px; position: relative; top: 27px"

Text="Label"></asp:Label>

<asp:Button ID="Button2" runat="server" BackColor="LimeGreen" ForeColor="White"

OnClick="Button2_Click" Style="left: -53px; position: relative; top: 20px" Text="Estemator" />

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Style="position: relative; left: 99px; top: 3px;"

Text="Scheduler" BackColor="LimeGreen" ForeColor="White" /><br />

<asp:CheckBoxList ID="CheckBoxList2" runat="server" RepeatDirection="Horizontal"

Style="left: 228px; position: relative; top: 49px">

</asp:CheckBoxList>&nbsp;

<br />

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="12px" Style="position: relative; left: 1px; top: 0px;"

Width="540px">

&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"

Style="left: -6px; position: relative; top: 6px">

</asp:DropDownList>

&nbsp;&nbsp;

<asp:Label ID="Label1" runat="server" Font-Bold="True" Style="left: -256px; position: relative;

top: 10px" Text="Estimator Appointment Of:" Width="112px"></asp:Label></telerik:RadAjaxPanel>

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" ></telerik:RadScriptManager>

 

<br />

<br />

--

 

%>

 

 

<div style="height:133px;width:1px;border:1px solid black; left: 7px; position: relative; top: 0px; z-index: 100;">

 

 

<p style="position: static" dir="ltr">

 

 

&nbsp;<asp:Label ID=lblBranchNotes runat=server Width="121px" style="position: relative; left: 2px; top: 0px;" Height="10px"></asp:Label>

 

 

<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" RepeatDirection="Horizontal"

 

 

Style="left: 495px; position: relative; top: 132px" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" Font-Size="Larger" RepeatLayout="Flow" Width="487px">

 

 

</asp:RadioButtonList></p>

 

 

</div>

 

 

<div style="height:136px;width:531px;border:1px solid black; left: 519px; position: absolute; top: 32px; z-index: 101;">

 

 

<p style="position: static">

 

 

&nbsp;<asp:Label ID=lblEstimatorNotes runat=server Width="600px" style="position: absolute; left: 2px; top: 0px;" Height="4px"></asp:Label></p>

 

 

</div>

 

 

<asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#004000" Style="left: 118px;

 

position: relative; top: -164px; z-index: 102;"

 

Text="Branch Notes"></asp:Label>

 

 

<asp:Label ID="Label3" runat="server" Font-Bold="True" ForeColor="#004000" Style="left: 477px;

 

position: relative; top: -166px; z-index: 103;"

 

Text="Estimator Notes"></asp:Label>

 

 

<telerik:RadScriptManager runat="server" ID="RadScriptManager2" ></telerik:RadScriptManager>

 

 

&nbsp; &nbsp; &nbsp;

 

 

&nbsp;&nbsp;

 

 

<asp:Label ID="Label1" runat="server" Font-Bold="True" Style="left: 60px; position: relative;

 

top: 14px; z-index: 104;"

 

Text="Estimator Appointment of:" ForeColor="#004000"></asp:Label>

 

 

&nbsp;&nbsp;

 

 

<asp:Button ID="btnLiveTransfer" runat="server" BackColor="#004000" ForeColor="White" OnClick="Button2_Click1"

 

 

Style="left: 61px; position: relative; top: -206px; z-index: 105;" Text="Live Transfer" />

 

 

<asp:CheckBoxList ID="CheckBoxList2" runat="server" RepeatDirection="Horizontal"

 

 

Style="left: 17px; position: relative; top: 70px; z-index: 106;" ForeColor="#0000C0" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList2_SelectedIndexChanged" ToolTip="Estimators" CausesValidation="True" AppendDataBoundItems="True" BorderColor="Lime" Font-Bold="True">

 

 

</asp:CheckBoxList>&nbsp;

 

 

<asp:Button ID="Button1" runat="server" BackColor="#004000" ForeColor="White" Style="left: 943px;

 

position: relative; top: -187px; z-index: 107;"

 

Text="Close" OnClick="Button1_Click1" Width="55px" />

 

 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;

 

 

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

 

 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

 

 

 

<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="1016px" SelectedView="MonthView"

 

 

TimeZoneOffset="00:00:00" SelectedDate="2009-05-14" DayStartTime="08:00:00" DayEndTime="18:00:00" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End" style="left: 8px; top: 1px; z-index: 108;" Height="485px" Skin="Sunset" DisplayDeleteConfirmation="True" GroupingDirection="Vertical" OnClientTimeSlotClick="OnClientTimeSlotClick" onClientTimeSlotContextMenu="onClientTimeSlotContextMenu" StartInsertingInAdvancedForm="True" EnableCustomAttributeEditing="True" EnableResourceEditing="False" ShowFullTime="True" BorderStyle="None" Font-Bold="True">

 

 

<localization advanceddescription="Estimator Notes"></localization>

 

 

<timelineview userselectable="False" showinsertarea="False" showresourceheaders="False"></timelineview>

 

 

</telerik:RadScheduler>

 

 

</form>

 

 

</body>

 

</

 

html>


aspx.cs
----------------------------------

 

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

 

{

 

//RadScheduler1.ShowInlineInsertForm(ParseJavaScriptTime(e.Argument).AddHours(8));

 

 

 

 

RadScheduler1.SelectedView =

SchedulerViewType.DayView;

 

RadScheduler1.SelectedDate = ParseJavaScriptTime(e.Argument);

}

 

private DateTime ParseJavaScriptTime(string jsTime)

 

{

 

DateTime result = DateTime.ParseExact(jsTime, "yyyyMMddHHmm", null, DateTimeStyles.AssumeUniversal);

 

 

return result.ToUniversalTime();

 

}


can any one solve the problem ajax request is not working in the scheduler
as well as ajax functionality is also not working

advance regards

immu

imtiyaz mohammed
Top achievements
Rank 1
 asked on 13 Jul 2009
4 answers
139 views
How to retrieve primary key field values for selected items, when the primary key field column visible set to "false"
Shinu
Top achievements
Rank 2
 answered on 13 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?