Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
124 views
I've got colorpickers both in and outside of a radgrid template. When a radwindow pops up all the colorpicker controls show overlayed on top of the radwindow. As if they needed their "itemindex" "send to back".

I couldn't find any equivelant setting nor did a Google pop up anything or anybody else with the problem (wasn't too sure of the search words to tell you the truth).

Thanks, Rodney
Svetlina Anati
Telerik team
 answered on 02 Jun 2008
2 answers
172 views
i am using this radtooltip control and if the assigned targetcontrol has a tooltip property, the radtooltip takes this tooltip and only displays this: all the rest of the controls inside the radtooltip aren't shown any more. how come?
Svetlina Anati
Telerik team
 answered on 02 Jun 2008
2 answers
165 views
Hi,

I think I am missing something here because I cant get this to work.  I have a statically defined DockLayout on my page with a single DockZone.  In the Page_Init event, I am dynamically creating further DockZones with Docks.  The page will allow the user to move Docks from the dynamically created DockZones to the static DockZone and save the state.  When I postback the page via a button, the static DockZone has no Docks in either the Button Click handler or the SaveDockLayout handler.  Here is my code - can anyone suggest why please?

Thanks in advance.


Client-side
<telerik:RadDockLayout ID="MainDockLayout" runat="server" OnSaveDockLayout="MainDockLayout_SaveDockLayout">  
    <span class="panelHeader">Active Rules</span> 
    <telerik:RadDockZone runat="server" ID="SelectedRules" Height="200" Width="75%" CssClass="dockZoneFixed"></telerik:RadDockZone> 
    <br /> 
</telerik:RadDockLayout> 
 

Server-side
RadDockZone dockZone = new RadDockZone();  
dockZone.ID = string.Format("DockZone_{0}", parent.ID);  
dockZone.Orientation = System.Web.UI.WebControls.Orientation.Vertical;  
dockZone.Height = 125;  
dockZone.MinHeight = 125;  
dockZone.CssClass = "dockZone";  
 
MainDockLayout.Controls.Add(dockZone);  
 
RadDock dock = new RadDock();  
dock.ID = string.Format("Dock_{0}", child.ID);  
dock.DockHandle = DockHandle.None;  
dock.Skin = "Vista";  
dock.CssClass = "dockClass";  
dock.OnClientInitialize = "SetDockHandle";  
 
dockZone.Controls.Add(dock);  
 
Jonathan
Top achievements
Rank 1
 answered on 02 Jun 2008
1 answer
305 views

Hi all,
   
        In my aspx page i have placed the 10 datagrid controls and 2 ddls.If any event fired in this page all grid prerender event is firing.Within the Panel i have placed the controls.using ajaxmanager to refresh the controls.How to avoid this unwanted prerender event firing?

Regards
Sangeetha

Konstantin Petkov
Telerik team
 answered on 02 Jun 2008
1 answer
128 views
Hi,

When I enable variations on MOSS, I see that the content of my RadEditor is changed as well, which is great!

But is there any way to see what the last version was? (before it was changed?)
In other words, can I add version control to the content of my RadEditor ?

tnx!
George
Telerik team
 answered on 02 Jun 2008
5 answers
248 views

I am trying to use a loading panel for when I authenticate a user, but it does not display. It's driving me crazy. This is the first time I've used RadControls. Here is the code below. Any ideas what I'm missing. Thanks in advance. KB

<%

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

<%

@ Register Src="WebUserControl.ascx" TagName="WebUserControl"TagPrefix="uc1" %>

<%

@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI" TagPrefix="asp" %>

<!

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

<

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

<

head id="Head1" runat="server">

<title>Test</title>

<link rel="stylesheet" href="stylesheet.css?version=1" type="text/css" />

</

head>

<

body vlink="blue" >

<form id="form1" runat="server" autocomplete="off" class="titles">

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

<tr>

<td colspan="2" style="height: 100px; width: 100%; background-image: url('images/header.gif')">

<asp:Image ID="Image1" ImageUrl="~/images/temp.jpg" runat="server" />

</td>

</tr>

</table>

<span class="titles" style="text-align:center">Welcome to my test<br />

</span>&nbsp;

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<br />

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="Login1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<br />

<asp:Login ID="Login1" runat="server" DisplayRememberMe="False"

TitleTextStyle-CssClass="image" TitleText="IEP Login" Width="334px" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333">

<TextBoxStyle Width="150px" CssClass="image" Font-Size="0.8em" />

<TitleTextStyle CssClass="gridTitles" BackColor="#6699CC" Font-Bold="True" Font-Size="0.9em" ForeColor="White" />

<InstructionTextStyle Font-Italic="True" ForeColor="Black" />

<LoginButtonStyle BackColor="White" BorderColor="#6699CC" BorderStyle="Solid" BorderWidth="1px"

Font-Names="Verdana" Font-Size="0.8em" ForeColor="#6699CC" />

</asp:Login>

<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

Width="75px" BorderColor="Black" HorizontalAlign="Center" MinDisplayTime="5" ToolTip="loading...">

&nbsp;<img alt="Loading..." src="Loading.gif" style="border-right: 0px; border-top: 0px;

border-left: 0px; border-bottom: 0px"

/>

</telerik:RadAjaxLoadingPanel>

<uc1:WebUserControl id="WebUserControl1" runat="server"></uc1:WebUserControl>

</asp:Panel>

&nbsp;&nbsp;<br />

&nbsp;

<asp:Label ID = "lblMessage" runat="server" Text="" style="top: 215px"></asp:Label>

<table style=" margin-left:auto; margin-right:auto; border-width:1" >

<tr>

<td align="center" style="height: 155px; width: 7px;" rowspan="1" ></td>

</tr>

</table>

<br />

<span class="bodyText"></span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 

&nbsp;<br />

&nbsp;<br />

<script type="text/javascript">

document.aspnetForm.ctl00$Main$Login1$UserName.focus();

document.aspnetForm.ctl00$Main$Login1$UserName.select();

</script>

<br />

<br />

&nbsp;  

<br />

<table border="0" cellpadding="0" cellspacing="0" width="100%" id="TABLE1" onclick="return TABLE1_onclick()">

<tr>

<td style="width: 100%; height: 15px;" class="footer">

<small>All contents copyright &copy;

School Test. Site best viewed at 1024 x 768.

</small>&nbsp;&nbsp; &nbsp;&nbsp;

</td>

</tr>

</table>

<asp:SiteMapDataSource ID="SiteMapDataSource1" Runat="server" />

</form>

</

body>

</

html>

---------------------------------------------------------------------------------------------------------------------

Option

Explicit On

Option

Strict On

Imports

System

Imports

System.Collections

Imports

System.ComponentModel

Imports

System.Configuration

Imports

System.Web

Imports

System.Data

Imports

System.Web.sessionstate

Imports

System.Data.OracleClient

Imports

System.Security.Cryptography

Imports

System.Text

Imports

System.DirectoryServices

Imports

System.Drawing

Imports

Telerik.Web.UI

Imports

System.Web.UI.WebControls

Imports

System.Web.UI.HtmlControls

 

Partial

Class _Default

Inherits System.Web.UI.Page

Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate

Dim DBConn As OracleConnection = Nothing

Dim dCmd As OracleCommand = Nothing

Dim intRetVal As Integer

Dim md5Hasher As New MD5CryptoServiceProvider()

Dim encoder As New UTF8Encoding()

Dim intLoginCount As Integer

Dim temp As String = "True" 'test only

Dim session As System.Web.SessionState.HttpSessionState = HttpContext.Current.Session

Try

'connect to the db

Session(

"ConnectionString") = ConfigurationManager.ConnectionStrings("DBConn").ConnectionString

session(

"destpage") = "~/destpage"

If IsAuthenticated(Login1.UserName.ToString, Login1.Password.ToString) Then

' if temp = "True" then

System.Threading.Thread.Sleep(9000)

FormsAuthentication.SetAuthCookie(

CStr(Login1.UserName), False)

DBConn = New OracleConnection(session("ConnectionString").ToString)

DBConn.Open()

dCmd =

New OracleCommand

With dCmd

.Connection = DBConn

.CommandText =

"pkg.test"

.CommandType = CommandType.StoredProcedure

.Parameters.Add(

"pUserId", OracleType.VarChar).Value = Login1.UserName

.Parameters.Add(

"pErrorMsg", OracleType.VarChar, 200).Direction = ParameterDirection.Output

.Parameters.Add(

"vRetVal", OracleType.VarChar, 5).Direction = ParameterDirection.ReturnValue

End With

intRetVal = dCmd.ExecuteNonQuery

'test if successful

If dCmd.Parameters("vRetVal").Value.ToString = "FALSE" Then

'user was not authenticated

Login1.FailureText =

"You do not have access."

Else

dim sb as StringBuilder = New StringBuilder() 'May15

session(

"username") = Login1.UserName.ToString

session(

"password") = Login1.Password.ToString

sb.append(

"<form name=t id=t action=ED/default.asp method=post>")

If session("destpage").ToString IsNot Nothing Then

sb.append(

"<input type=hidden name=destpage value=" + session("destpage").ToString + ">")

End If

sb.append(

"</FORM>")

sb.append(

"<scr" + "ipt>t.submit();</scr" + "ipt>")

Response.Write(sb)

End If

Else

If IsNothing(session("LoginCount")) Then

'create count

session(

"LoginCount") = 1

Else

intLoginCount =

CInt(session("LoginCount").ToString)

If intLoginCount < 3 Then

intLoginCount += 1

End If

session(

"LoginCount") = intLoginCount

End If

'user does not exist

Login1.FailureText =

"Login ID or password is incorrect. "

End If

Catch ex As Exception

lblMessage.Text =

"There was an error during login."

Finally

If (Not IsNothing(DBConn)) Then

DBConn.Close()

End If

dCmd =

Nothing

End Try

End Sub

Private Function IsAuthenticated(ByVal username As String, ByVal pwd As String) As Boolean

Dim domainAndUsername As String = username

Dim deMasterEntry As DirectoryEntry

Try

'Create the master entry object

deMasterEntry =

New DirectoryEntry("LDAP://ec-dc1.abcde.ca", domainAndUsername, pwd, AuthenticationTypes.Secure)

Dim obj As Object = deMasterEntry.NativeObject

Return True

Catch ex As Exception

Dim EventLog1 As System.Diagnostics.EventLog = New System.Diagnostics.EventLog()

EventLog1.Source =

"KB"

EventLog1.WriteEntry(

"Could not authenticate AD master account. Message: " & ex.Message & " Source: " & ex.Source)

Return False

End Try

End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

lblMessage.Text =

""

End Sub

End

Class

Maria Ilieva
Telerik team
 answered on 02 Jun 2008
3 answers
143 views
Hello,

I am using a standard presentation for some buttons: they are inserted in a placeholder with non breaking space between each.
The placeholder is itselft in a TableCell (TD)  with a style of align:right and nowrap.
With these settings when I have 3 buttons, they are aligned on the same line like this:
buton1-button2-button3
Then when I ajaxify with RadAjaxManager the second button, a div is created around this button and my UI i broken, I get the 3 buttons in a vertical align like this
button1
button2
spc-button3

Is there a way to avoid this, could be a good feature to be able to add style directives to the updatePanel (div) inserted around a button with some API in AddAjaxSettings. (may be it exists ?)

Thanks for help
CS
CSurieux
Top achievements
Rank 2
 answered on 02 Jun 2008
4 answers
166 views

I'm using RadGrid 2008.1.515.35 with an ArrayList as datasource and trying to make a hierarchical grid working with paging and virtual scrolling.
I've tried so hard by i couldn't make. First of all the paging is not presented. I'm sure that there is enough data to make pager visible but it is not.
This behaviour is strange because when i'm using 2008.1.414.35 version, the paging is shown. Below is the source code. Please what i'm doing wrong ?

Thanks in advance.

Best regards.

protected override void OnInit(EventArgs e){
    RadGrid RadGrid1 = new RadGrid();
    RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(Grid_NeedDataSource);
    RadGrid1.DetailTableDataBind += new GridDetailTableDataBindEventHandler(Grid_DetailTableDataBind);
    RadGrid1.MasterTableView.DataKeyNames = new string[] { "Item_ID", "Parent_ID" };
    RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { "Item_ID", "Parent_ID" };
    RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
    RadGrid1.MasterTableView.SelfHierarchySettings.KeyName = "Item_ID";
    RadGrid1.MasterTableView.SelfHierarchySettings.ParentKeyName = "Parent_ID";
    RadGrid1.MasterTableView.GroupLoadMode = GridGroupLoadMode.Client;
    RadGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed;
    RadGrid1.MasterTableView.PageSize = 10;
    RadGrid1.MasterTableView.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced;
    RadGrid1.MasterTableView.PagerStyle.Position = GridPagerPosition.Bottom;
    RadGrid1.AllowPaging = true;
    RadGrid1.VirtualItemCount = 1000;
    RadGrid1.AllowCustomPaging = true;
    RadGrid1.AllowSorting = true;
    RadGrid1.AutoGenerateColumns = false;
    RadGrid1.EnableLinqExpressions = true;
    RadGrid1.Skin = "Office2007";
    RadGrid1.GroupingEnabled = true;
    RadGrid1.AllowMultiRowSelection = true;
    RadGrid1.ShowGroupPanel = true;
    RadGrid1.ClientSettings.AllowDragToGroup = true;
    RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;
    RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
    RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
    RadGrid1.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
    RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = true;
    RadGrid1.ClientSettings.AllowColumnsReorder = true;
    RadGrid1.ClientSettings.AllowExpandCollapse = true;
    RadGrid1.ClientSettings.ReorderColumnsOnClient = true;
    RadGrid1.ClientSettings.Resizing.AllowColumnResize = true;
    RadGrid1.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
    RadGrid1.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";
    RadGrid1.ClientSettings.ClientEvents.OnRowClick = "OnRowClick";
    RadGrid1.ClientSettings.ClientEvents.OnRowDeselected = "OnRowDeselected";
    RadGrid1.ClientSettings.ClientEvents.OnRowSelected = "OnRowSelected";
    RadGrid1.ClientSettings.ClientEvents.OnRowContextMenu = "RowContextMenu";
    RadGrid1.MasterTableView.FilterExpression = "Parent_ID = 0";

    //here a i create the grid columns

    this.PlaceHolder.Controls.Add(RadGrid1);
}

protected void Grid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    List<DItemVersion> items = Session["GenericItemList_Items"] as List<DItemVersion>;
    if (items == null)
    {
        Grid.DataSource = new ArrayList();
    }
    else
    {
        int curIndex = Grid.CurrentPageIndex;
        int maximum = Grid.MasterTableView.PageSize;

        if ((curIndex + maximum) > items.Count - 1)
        {
            maximum = items.Count - curIndex;
        }

        Grid.DataSource = new ArrayList(items.GetRange(curIndex, maximum));
    }
}

protected void Grid_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
{
    GridTableView parentView = e.DetailTableView.ParentItem.OwnerTableView;
    Telerik.Web.UI.DataKey parentKey = parentView.DataKeyValues[e.DetailTableView.ParentItem.ItemIndex];

    e.DetailTableView.FilterExpression = "Parent_ID = " + parentKey["Item_ID"];
}

leonardo
Top achievements
Rank 1
 answered on 02 Jun 2008
1 answer
88 views
Hi,

I am using RadWindow to provide a popup data entry form and functionally everything works great.

The only problem is that, when opening the RadWindow for the second time, the previous form is displayed for a fraction of a second before being updated with the current form.

I've tried setting DestroyOnClose="true" but it persists.

Any ideas? Thanks, Paul.
Georgi Tunev
Telerik team
 answered on 02 Jun 2008
4 answers
234 views
Right now I have a RadGrid with its MasterTableView's "CommandItemDisplay="Top"" configured.

This setting shows a "Add new record" control above the Grid and allows inserting a new item.

But I don't want this control to be shown. Instead, I want to use a regular button somewhere else on the ASP page. When pressed, the Grid should behave just like it would be upon clicking the "Add new record" button.

Which event does the Button have to trigger in the RadGrid in order for this behaviour to show?

Thanks

s.
Iana Tsolova
Telerik team
 answered on 02 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?