Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
200 views

Hello, I had a problem with an application done in ASP.NET that RADComboBox uses, today there were updates of the firewall and that surprise that to the moment to give click in the radcombobox the page was cutting the connection, investigating we think that the problem owed to itself that the firewall was detecting as injection of sql in the event of this control. I request his(her,your) support please to help myself to finding a solution.

Thank you

Jorge
Top achievements
Rank 1
 asked on 28 Jan 2009
2 answers
81 views
is it possible to use a usercontol file when loading a detailtable?
ie
...
<DetailTables>
<uc1: DetailTable id="NestedGrid" />
</DetailTables>

and then have the nestedGrid just another radgrid? is it possible to still have a parentTableRelation? Do you have a mastertable on the NestedGrid? Is this a terrible idea? I was just hoping that I could create a grid of 100 percent of my data, and then call that grid into my mastertable and utilize the parentTableRelation... then later if I need that 100% grid again in a differnet place just reuse and recycle.
Am I crazy? If this is possible can you point to any demos or tutorials? I have looked through the knowledge base and dont' see any reference to this.

mac
mac
Top achievements
Rank 1
 answered on 28 Jan 2009
2 answers
411 views
I want to navigate to the different page on click of button which is on modal popup.When I do this through my existing code its opening the new page to same popup window , i want to open a new page to parent page and close modal popup.
default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Pages_Default" %>
<%@ Register assembly="Telerik.Web.UI" 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">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadWindowManager ID="RadWindowManager1"  runat="server" style="z-index:8000" Behaviors="Close,Move,Reload" 
          Modal="true" Animation="None" ShowContentDuringLoad="true" VisibleOnPageLoad="true"
               Skin="WebBlue">
           <Windows>
                <telerik:RadWindow 
                            OpenerElementID=""     
                            Width="820px"                
                            Height="540px"
                            NavigateUrl="RoleList.aspx"
                            Runat="server" 
                            Id="Radwindow1" 
                            VisibleStatusbar="false" ClientCallBackFunction="CallParentRole" >
                </telerik:RadWindow> 
          </Windows>  
        </telerik:RadWindowManager>

    </form>
</body>
</html>


default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Pages_Default : QMSPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
      
    }
  
}

Rolelist.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleList.aspx.cs" Inherits="RoleList" %>

<!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 runat="server">
    <title>Untitled Page</title>
    
    <script type="text/javascript">
    function CallParentRole(radWindow, returnValue)
        {
             
             document.getElementById("Button1").click();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <table border="1" style="width:200px;">
        <tr>
            <td>
                <asp:RadioButtonList ID="rblRole" runat="server">
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="btnGo" runat="server" Text="Go" onclick="btnGo_Click" />
            </td>
        </tr>
        </table>   
    </form>
</body>
</html>

RoleList.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class RoleList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            MembershipUser user = Membership.GetUser();
            if (user == null)
                Response.Redirect("~/login.aspx");

            string[] str = Roles.GetRolesForUser(user.UserName);
            if (str.Length == 0)
            {
                Response.Redirect("~/Logoff.aspx");
            }

            for (int i = 0; i < str.Length; i++)
            {
                ListItem li = new ListItem();
                li.Text = str[i].ToString();
                if (i == 0)
                {
                    li.Selected = true;
                }
                rblRole.Items.Add(li);
            }            
        }
    }
    protected void btnGo_Click(object sender, EventArgs e)
    {
        Session["RoleName"] = rblRole.SelectedItem.Value;        
        Response.Redirect("~/Pages/default.aspx");
        
    }
}

can any one help me in this... :)
Felipe Saldana
Top achievements
Rank 1
 answered on 27 Jan 2009
3 answers
153 views
Hi,

My scenario is this, I have a Rad scheduler binded on a generic list.  I want a functionality that whenever I hover on a particular cell item on the scheduler it will show a popup of the details of that particular item.  Can I possibly achieved this via Rad tooltip?

Thanks,
Nix
craig
Top achievements
Rank 1
 answered on 27 Jan 2009
7 answers
245 views
Hi there I have a radcombobox that gets enabled and disabled via a client side javascript. When the control is disabled the style cuts off the bottom half of the radcombobox has anyone else seen this issue?
Rory
Top achievements
Rank 1
 answered on 27 Jan 2009
1 answer
264 views
I have a rad Grid and I am manually setting certain rows to edit mode using the .edit property server side, but when i return to the screen even though in the code behind the row is being set to edit mode it doesn't seem to be refreshing.  The row shows up in non-edit mode.  Is there something special I have to do in order to refresh the grid?

Thanks
Daniel
Telerik team
 answered on 27 Jan 2009
3 answers
156 views

Hello ,

I want to add some validates at bounded columns , I  tried hardly to let it work but I failed so please help me in this issue :-
first of all i have grid has 4 Bounded column
 <telerik:GridBoundColumn  DataField="EmployerName" HeaderText="Employer&nbsp;Name"  UniqueName="EmployerName"/>
 <telerik:GridBoundColumn DataField="Position" HeaderText="Position" UniqueName="Position" />
 <telerik:GridDateTimeColumn DataField="FromDT" HeaderText="From" UniqueName="FromDT" />
 <telerik:GridDateTimeColumn DataField="ToDT" HeaderText="To" UniqueName="ToDT"/>

I need to add 4 required validation on these column
I registered ItemCreated event and tried to add validations like that
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {

        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RequiredFieldValidator validator1 = new RequiredFieldValidator();
            validator1.ID = "validator1";
            validator1.ErrorMessage = " * " ;
            (item["EmployerName"].Controls[0] as TextBox).ID = item.ClientID + "_TextBox";
            validator1.ControlToValidate = (item["EmployerName"].Controls[0] as TextBox).ID;
            item["EmployerName"].Controls.Add(validator1);
        }
  }


Vaildators worked well but at insert or update event handler after called extract values method , I figured that the value for the EmployerName and Position columns was always equal null and other have values.

item.ExtractValues(newValues); // newValues["EmployerName"] , Although I entered value in the edit form

after that I tried to add the Vaildators at item data bound event but it is still the same and the values returned null also.

I think when I changed the id of the item[ColumnUniqueName].control[0] the extract item didn't work well .



Daniel
Telerik team
 answered on 27 Jan 2009
4 answers
271 views

I had a login form -- two rad text boxes and a button -- and was calling LoginIdRadTextBox.Focus() in the code behind (Page_PreRender).

The TabIndex for the controls (login, password, button) was set explicitly in the markup as 10, 20 , 30 respectively.  This form was used in production for some time, but with the latest release (2008.3.1105.20) the behavior changed.  Instead of tabbing from the LoginIdRadTextBox to the PasswordRadTextBox, pressing tab would instead take you to the address bar.

I found that the Focus() method wasn't working reliably in some browsers anyway, so I killed two birds with one stone by replacing the call to Focus() in the code-behind with this:

 

Telerik.Web.UI.RadScriptManager.RegisterStartupScript(Page,

GetType(Page), "Focus", String.Format("window.setTimeout(""document.getElementById('{0}_text').focus()"", 300);", LoginIdRadTextBox.ClientID), True)

In working toward this solution, I also tried using RadAjaxManager.FocusControl() but that wouldn't work either.  I didn't want to create a case because I have the work-around above, but in future releases I'd like to see tabbing/enter key behavior in a form work exactly as it does without the decoration (I had to employ yet another work around for enter key behavior).

 

Stoick
Top achievements
Rank 2
 answered on 27 Jan 2009
1 answer
84 views
I've discovered that when inserting a link around an image in a list, the linked image will be removed from the <li> and placed just before the closing </ul> or </ol>.

This occurs in both Firefox 2.0.0.20 and 3.0.5.

Here's the steps to reproduce:

  1. Open an editor in HTML mode (the demo one is fine: http://demos.telerik.com/aspnet-ajax/Editor/Examples/Default/DefaultCS.aspx)
  2. Paste in the following code:
    <ul> 
        <li><img src="http://www.izilla.com.au/img/logos/logo_izilla.png" alt="Izilla Logo" /></li
        <li><img src="http://www.izilla.com.au/img/logos/cogdotgov.gif" alt="Cognition ECM Logo" /></li
    </ul> 
     
  3. Switch to design view
  4. Using the Link Manager, add a link around one of the images.

You'll end up with something like this:
<ul> 
    <li></li
    <li><img alt="Cognition ECM Logo" src="http://www.izilla.com.au/img/logos/cogdotgov.gif" /></li
    <href="http://www.izilla.com.au"><img alt="Izilla Logo" src="http://www.izilla.com.au/img/logos/logo_izilla.png" /></a></ul> 
 

Regards

Matt
Tervel
Telerik team
 answered on 27 Jan 2009
2 answers
136 views
I'm trying to have a combo box display a list of images with thumbnails and the image file name. The thumbnails are not showing up. I'm getting the red X in its place in Internet Explorer and nothing shows up in Mozilla Firefox. How do I fix this?

Protected

Sub BindToImageList(ByVal combo As RadComboBox)

 

 

''Populate the datatable

 

 

Dim sConnString As String = ConfigurationManager.ConnectionStrings("PU89").ConnectionString

 

 

Dim objConnection As New SqlClient.SqlConnection(sConnString)

 

 

Dim strSQL As String

 

strSQL =

"SELECT * FROM tblPhotoGallery; "

 

 

Dim objDR As SqlDataReader

 

 

Dim command As New SqlClient.SqlCommand(strSQL, objConnection)

 

 

Dim strFullPath As String

 

 

Dim strFileName As String

 

 

Me.rcboImage.Items.Add(New RadComboBoxItem("", ""))

 

 

Try

 

objConnection.Open()

objDR = command.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

 

While objDR.Read()

 

strFullPath = objDR(

"ImagePath")

 

strFileName = Path.GetFileName(strFullPath)

 

Me.rcboImage.Items.Add(New RadComboBoxItem(strFileName, strFileName))

 

 

Me.rcboImage.FindItemByText(strFileName).ImageUrl = objDR("ImagePath")

 

 

Me.rcboImage.FindItemByText(strFileName).DisabledImageUrl = objDR("ImagePath")

 

 

End While

 

 

 

Catch ex As Exception

 

Response.Write(ex.Message)

Response.End()

 

Finally

 

 

If objConnection.State = ConnectionState.Open Then

 

objConnection.Close()

 

End If

 

 

End Try

 

 

End Sub

 

sbowman
Top achievements
Rank 1
 answered on 27 Jan 2009
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?