Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
183 views
Hi,

I have a problem,
i have an asp.net panel with scrolling. That panel control is built in layers, so the RadDockLayout is one of its layers. The RadDocks control which are added dynamicly to this layer must be relative to a specific point (Top and Left properties). If I remove the scrolling property of the panel then it is works fine, BUT, if I keep the scrolling property and scroll up, down, right or left then the raddock will stay in its postion and will refer to another point in the map (Please view the attached images).

aspx page:

<

 

 

td style="width:76%;" >

 

 

 

<asp:Panel ID="Panel2" Width="710px" style="margin-top:-18px;" BorderWidth="0" Height="390px" runat="server" >

 

 

 

<asp:Panel ID="bg" Height="410px" ScrollBars="Auto" runat="server" >

 

 

 

<asp:Image ID="CMapImage" runat="server" />

 

 

 

<asp:Label ID="Label1" runat="server" Visible="false" Text="Label"></asp:Label><br />

 

 

 

<asp:Label ID="Label2" runat="server" Visible="false" Text="Label"></asp:Label>

 

 

 

</asp:Panel>

 

 

 

<asp:Panel ID="LayerPanel1" runat="server">

 

 

 

<telerik:RadDockLayout ID="RadDockLayout1" runat="server">

 

 

 

 

</telerik:RadDockLayout>

 

 

 

</asp:Panel>

 

 

 

<asp:Panel ID="content" runat="server">

 

 

 

<table border="0" cellpadding="0" cellspacing="0" width="100%">

 

 

 

<tr>

 

 

 

<td align="left" valign="middle">

 

 

 

<asp:Panel ID="CityNameOnTheMapPanel" style="margin-left:10px" runat="server">

 

 

 

<asp:Label ID="CityNameLabel" Font-Size="14pt" runat="server" ></asp:Label>&nbsp;

 

 

 

<asp:Label ID="OnTheMapLabel" runat="server" Font-Size="14pt" Font-Bold="true" Text="ON THE MAP"></asp:Label>

 

 

 

</asp:Panel>

 

 

 

</td>

 

 

 

<td align="right">

 

 

 

<asp:Label ID="excuteWindowOpenInFullScreen" runat="server" Visible="false"></asp:Label>

 

 

 

<asp:ImageButton ID="ImageButton1"

 

 

 

ImageUrl="~/Common/Img/Buttons/FullScreen.jpg" runat="server"

 

 

 

OnClientClick="UseRadWindow();return false;" />

 

 

 

<asp:ImageButton ID="ImageButton2" Visible="false" ImageUrl="~/Common/Img/Buttons/Print.jpg"

 

 

 

runat="server" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</asp:Panel>

 

 

 

</asp:Panel>

 

 

 

 

</td>

 



c# code:

private

 

 

RadDock CreateRadDock(string dockNum, string bsnsName, string website, int top, int left, string colr)

 

{

 

 

int docksCount = CurrentDockStates.Count;

 

 

 

RadDock dock = new RadDock();

 

dock.ID =

 

string.Format("RadDock{0}", dockNum);

 

dock.Title =

 

string.Format("Dock {0}", dockNum);

 

dock.Width =

 

Unit.Pixel(180);

 

dock.EnableEmbeddedSkins =

 

false;

 

dock.Left =

 

Unit.Pixel(left);

 

dock.Top =

 

Unit.Pixel(top);

 

dock.BackColor.GetBrightness();

dock.OnClientInitialize =

 

"SetHandleDock";

 

dock.DockMode =

 

DockMode.Docked;

 

dock.DockHandle =

 

DockHandle.Grip;

 

dock.Text =

 

"<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td style='background-color:#" + colr + "; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-width:thin; border-top-width:thin; border-right-width:thin; border-left-width:thin;'><div style='margin:2px;'" + string.Format("<a href='{0}'>{1}</a> ", website, bsnsName) + "</div></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><img alt='' src='Common/Img/Lines/000000.gif' /></td></tr></table>";

 

dock.UniqueName =

 

Guid.NewGuid().ToString();

 

 

 

return dock;

 

}



protected

 

 

void CommonCheckBox_CheckedChanged(object sender, EventArgs e)

 

{

 

 

string _iDs = string.Empty;

 

 

 

 

DataLstObjctGetData _dataLstObjctGetData = new DataLstObjctGetData();

 

 

 

DataSet _myDataSet = new DataSet();

 

_myDataSet = _dataLstObjctGetData.GetHotSpots(GetCtgryLst(), City, SmallMapPosition);

 

 

DataTable _myDataTable = new DataTable();

 

_myDataTable = _myDataSet.Tables[0];

Session[

 

"HotSpotsDataTable"] = _myDataTable;

 

GridView1.DataSource = _myDataTable;

GridView1.DataBind();

RadDockLayout1.Controls.Clear();

 

 

foreach (DataRow _row in _myDataTable.Rows)

 

{

 

 

RadDock dock = CreateRadDock(_row["HSHotSpotID"].ToString(), _row["BBsnsName"].ToString(), _row["BBsnsWebsite"].ToString(), Convert.ToInt32(_row["HSYCord"]), Convert.ToInt32(_row["HSXCord"]), _row["CCtgryColr"].ToString());

 

RadDockLayout1.Controls.Add(dock);

 

 

if (_iDs.ToString().Equals(string.Empty))

 

{

_iDs += _row[

 

"HSHotSpotID"].ToString();

 

}

 

 

else

 

{

_iDs +=

 

"," + _row["HSHotSpotID"].ToString();

 

}

}

Label1.Text = _iDs.ToString();

}

Please, I need your help to make my raddock refers to the same point even if I scroll.
It is apprecited to send me the modified code.

Regards,
Bader

Pero
Telerik team
 answered on 22 Oct 2010
6 answers
475 views
Hello,

I'm having a problem with the javascript functions set_text() and get_text() functions.
Below is a simple page to demonstrate. When I click the button I get an error saying " Object doesn't support this property or method"
I've already searched the forums but none of the existing topics helped me out.

Thanks in advance for any tips!
Regards,
Jasper

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Tests_Test" MasterPageFile="~/MasterPageEmpty.master" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ MasterType VirtualPath="~/MasterPageEmpty.master" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">   
  <script language="javascript" type="text/javascript">
   function Test() {
     var combo = $find('<%=RadComboBox1.ClientID%>');
     alert(combo.get_Text());
   }
  </script>
</telerik:RadScriptBlock>
  
  <atlas:UpdatePanel ID="UpdatePanel" runat="server">
    <ContentTemplate>
      <telerik:RadComboBox ID="RadComboBox1" runat="server" DataTextField="CompanyName"
        DataValueField="ID" ItemRequestTimeout="500" Height="300px" NoWrap="true" ShowDropDownOnTextboxClick="false"
        EnableLoadOnDemand="True" EnableItemCaching="true" OnItemsRequested="OnSupplierItemsRequested"
        >
      </telerik:RadComboBox>
        
      <button onclick="Test()">Test</button>
        
    </ContentTemplate>
  </atlas:UpdatePanel>
</asp:Content>
Ken Jones
Top achievements
Rank 1
 answered on 22 Oct 2010
5 answers
127 views
Hi,

I'm trying to you the client-side for export radgrid data.
I'm calling this function on the client click of my export button :
function ExportGridCsv()
{
    var grid=$find("MyRadGrid");
    if(grid)
        grid.get_masterTableView().exportToCsv();
    return false;
}
I've also add this function on ClientEvents-OnRequestStart of my RadAjaxPanel :
function BeginHandlerExport(AjaxPanel, args)
{
    //Util pour l'export des datas
    if (args.get_eventTarget().indexOf("btn_export") != -1)
        args.set_enableAjax(false);
}

When i click on my button to export my data, a postback is done, needdatasource is called, but nothing happen next. I'm not able to export my radgrid data.
Have you any idea for solve this problem ?

Thanks a lot
Daniel
Telerik team
 answered on 22 Oct 2010
1 answer
64 views
Hello... we're new to telerik controls, and so far i love them but I am facing a little problem:
I'm using a RadScheduler and using resources and grouping them just like the resources example.
on the AppointmentInsert event i have no problem getting the Subject, Start and End date, but since im usin resources i need to find a way to get the current resource so i can insert to the DB.

Thank you very much in advance.
Peter
Telerik team
 answered on 22 Oct 2010
1 answer
77 views
Hi,

How Can I do to Obtain in the code behind the Resource of the appointment when I adding an appointment???

I have this code:

    protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
    {
        string mSubject = e.Appointment.Subject;
        DateTime mStart = e.Appointment.Start;
        DateTime mEnd = e.Appointment.End;
        string mResource = e.Appointment.??????????????????;
    }

I have this code to populate my schedule:

 protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) ();
    }

void cargarSalones()
    {
        DataSet ds = new DataSet();
        DataTable dtSalones = new DataTable("salones");
        DataTable dtDetalle = new DataTable("detalle");
        
        dtSalones.Columns.Add(new DataColumn("salon", typeof(System.Int32)));
        dtSalones.Columns.Add(new DataColumn("nombre", typeof(System.String)));

        dtDetalle.Columns.Add(new DataColumn("salon", typeof(System.Int32)));
        dtDetalle.Columns.Add(new DataColumn("asunto", typeof(System.String)));
        dtDetalle.Columns.Add(new DataColumn("inicio", typeof(System.DateTime)));
        dtDetalle.Columns.Add(new DataColumn("fin", typeof(System.DateTime)));

        DataRow row = dtSalones.NewRow();
        row["salon"] = 1;
        row["nombre"] = "Salon 101";
        dtSalones.Rows.Add(row);

        DataRow row2 = dtSalones.NewRow();
        row2["salon"] = 2;
        row2["nombre"] = "Salon 202";
        dtSalones.Rows.Add(row2);
        
        DataRow row3 = dtDetalle.NewRow();
        row3["salon"] = 1;
        row3["asunto"] = "Curso A101 - Carrera LAE";
        row3["inicio"] = "08:00";
        row3["fin"] = "08:59";
        dtDetalle.Rows.Add(row3);

        DataRow row4 = dtDetalle.NewRow();
        row4["salon"] = 2;
        row4["asunto"] = "Curso B02 - Carrera II";
        row4["inicio"] = "10:00";
        row4["fin"] = "10:59";
        dtDetalle.Rows.Add(row4);

        ds.Tables.Add(dtSalones);
        ds.Tables.Add(dtDetalle);

        for (int ii = 0; ii < ds.Tables["salones"].Rows.Count; ii++)
        {
            ResourceType salon = new ResourceType();
            salon.KeyField = Convert.ToString(ds.Tables["salones"].Rows[ii]["salon"]);
            salon.Name = Convert.ToString(ds.Tables["salones"].Rows[ii]["nombre"]);
            RadScheduler1.ResourceTypes.Add(salon);
        }

        RadScheduler1.DataSource = ds;
        RadScheduler1.DataMember = "detalle";
        RadScheduler1.DataKeyField = "salon";
        RadScheduler1.DataSubjectField = "asunto";
        RadScheduler1.DataStartField = "inicio";
        RadScheduler1.DataEndField = "fin";
        RadScheduler1.DataDescriptionField = "asunto";
    }

Thanks in Advance.
Peter
Telerik team
 answered on 22 Oct 2010
1 answer
109 views
I am using the The RadSiteMap Control and everthing is working fine except security trimming..it produces a tree structure about 3-4 levels deep in 2 column format. This sitemap is bound to a web.sitemap with security trimming enabled in the web.config

On the same page I have a Asp.net Menu Control using the same web.sitemap file...

Here is my problem the asp.net menu control gets trimmed correctly not showing any nodes that the user doesn't have access to...but the telerik rad control does not ..it shows everything

Any advice would be greatly appreciated.

I have already tried removing the asp.net menu...the radsitemap still doesn't trim

Cheers
Brent
Brent
Top achievements
Rank 1
 answered on 22 Oct 2010
3 answers
154 views
Hi,

I have a listbox with different items that display different elements in my page when i click on it. But if the user has modified anything in the page i'm calling a confirm window to be sure the user want to change his current selected item without saving the change.

The thing is i'm using OnClientSelectedIndexChanged and it still doing a post back even if i have call args.set_cancel(true).

Is there a way to cancel the client click without doing a post back in my page???

Thx for your help,

Guillaume
Genady Sergeev
Telerik team
 answered on 22 Oct 2010
1 answer
100 views
Is ist possible to $create() and render() the RadComboBox client side?
I don't need the server sider Control.
Kalina
Telerik team
 answered on 22 Oct 2010
3 answers
146 views


<
table style="width: 757pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="1008"
<colgroup><col style="width: 18pt;" width="24" /><col style="width: 98pt;" width="131" /><col style="width: 56pt;" width="74" /><col style="width: 73pt;" width="97" /><col style="width: 66pt;" span="2" width="88" /><col style="width: 80pt;" width="106" /><col style="width: 90pt;" width="120" /><col style="width: 49pt;" width="65" /><col style="width: 90pt;" width="120" /><col style="width: 71pt;" width="95" /></colgroup
<tbody
<tr style="height: 15pt;" height="20"
<td style="border-bottom-color: #ece9d8; border-left: windowtext 1pt solid; background-color: transparent; border-top-color: #ece9d8; width: 18pt; height: 15pt; border-right-color: #ece9d8;" class="xl66" align="right"><strong><span style="font-family: arial; color: #0070c0; font-size: 13px;">1</span></strong></td
<td style="background-color: transparent; width: 668pt;border-color: #ece9d8;" class="xl67" colspan="9"><span style="font-family: arial; font-size: 13px;">Per policy, the bid exception such as a third bidder declined, sole source, or the lowest bid not selected was properly documented within the project</span></td
<td style="background-color: transparent; width: 71pt;border-color: #ece9d8;"></td
</tr
<tr style="height: 15pt;" height="20"
<td style="border-bottom-color: #ece9d8; border-left: windowtext 1pt solid; background-color: transparent; border-top-color: #ece9d8; height: 15pt; border-right-color: #ece9d8;" class="xl66"><strong><span style="font-family: arial; color: #0070c0; font-size: 13px;"> </span></strong></td
<td style="background-color: transparent;border-color: #ece9d8;" class="xl67" colspan="4"><span style="font-family: arial; font-size: 13px;">release summary. This was not deemed an exception. </span></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
</tr
<tr style="height: 15pt;" height="20"
<td style="border-bottom-color: #ece9d8; border-left: windowtext 1pt solid; background-color: transparent; border-top-color: #ece9d8; height: 15pt; border-right-color: #ece9d8;" class="xl66" align="right"><strong><span style="font-family: arial; color: #0070c0; font-size: 13px;">2</span></strong></td
<td style="background-color: transparent;border-color: #ece9d8;" class="xl68" colspan="9"><span style="font-family: arial; font-size: 13px;">Per Ken Stephenson, equipment only purchases without installation do not require signed contracts. This is not deemed an exception. </span></td
<td style="background-color: transparent;border-color: #ece9d8;"></td
</tr
<tr style="height: 15pt;" height="20"
<td style="border-bottom-color: #ece9d8; border-left: windowtext 1pt solid; background-color: transparent; border-top-color: #ece9d8; height: 15pt; border-right-color: #ece9d8;" class="xl66" align="right"><strong><span style="font-family: arial; color: #0070c0; font-size: 13px;">3</span></strong></td
<td style="background-color: transparent;border-color: #ece9d8;" class="xl68" colspan="10"><span style="font-family: arial; font-size: 13px;">These attributes were not tested here as this is a supplemental release issued for an existing contact/PO. See testing of the initial releases #25013 and #25117.</span></td
</tr
</tbody
</table>

Hi,
I am using Rad Telerik Ajax control version 2010.2.929.35, and try copy paste from excel to editor. Preview mode is fine and Design mode formates very weird. I also tried from telerik demo site.  The above is the html which is generated from Editor after I pasted from Excel. Copy these html to Editor under Html mode and you will see the problem from design view. Our application only enable the Design view for Editor.
Rumen
Telerik team
 answered on 22 Oct 2010
1 answer
167 views
In the example on page Multi Row Example, it shows how to create a drop-down with multiple rows and columns. It looks like this defaults to horizontal repeat direction.

Is there a way to get my results to  repeat vertically instead?

(Im also using a Ajax Templates with a Webservice for the combobox.)
Kamen Bundev
Telerik team
 answered on 22 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?