Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 views
Hi i try to open a new url in my control windows but i can, I use the next code:
 Me.RadWindow1.NavigateUrl = "http://www.hotmail.com"

I dont know what is wrong maybe I need another line of code.




Georgi Tunev
Telerik team
 answered on 09 Oct 2008
7 answers
363 views
I'm having an issue with a RadWindow showing itself in a IFrame in my page, instead of creating a new window.

By default, the window is not shown.  I have a dropdown on an update panel in my master page, and when a specific value is chosen, the RadWindow.VisibleOnPageLoad is set to true. 

On most pages, this work just fine.  However, on one of my pages I have an IFrame showing a document(pdf).  When the RadWindow is shown, it takes over (or at least attempts to depending on the browser) the IFrame, putting its content inside the IFrame instead of launching in its own window.

Is there a better way to launch the window programatically so it doesn't steal the IFrames in my content pages?

Thanks
Adam
Georgi Tunev
Telerik team
 answered on 09 Oct 2008
1 answer
115 views
I have a browser functional difference using RadToolTip in template columns in RadGrid.  I have successfully used these tooltips in IE7 and FF3, but I recently upgraded to IE8 Beta 2 and now the tool tips do not display when hovering above the tooltip-ified columns.  They do display when you click and hold the mouse button down on the tooltip-ified element in IE8, but shouldn't the behavior be similar across browsers?

All that being said, this could be purely a Microsoft problem and Telerik may not be interested in trying to get all their tools 100% compatible with beta browsers. But if Steve Ballmer and Co. are changing the rules, I thought you might like to know.

IE version showing this behavior is: 8.0.6001.18241

Code to reproduce the problem is below.

ASPX:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RGTest.aspx.vb" Inherits="MyApp.RGTest" %> 
 
<%@ 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>RGTest</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <asp:ScriptManager runat="server" ID="smMain"
        </asp:ScriptManager> 
        <telerik:RadGrid ID="RadGrid1" runat="Server" Skin="WebBlue" AutoGenerateColumns="False" GridLines="None"
            <MasterTableView> 
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
                <Columns> 
                <telerik:GridTemplateColumn CurrentFilterFunction="NoFilter" DataField="Description"  
                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="Description" 
                    SortExpression="Description" UniqueName="Description"
                    <ItemTemplate> 
                        <asp:Label ID="lblDescription" runat="Server" Text='<%#Eval("Short_Description")%>'></asp:Label> 
                        <telerik:RadToolTip ID="RadToolTipDescription" runat="server" TargetControlID="lblDescription" RelativeTo="Element" Skin="WebBlue" 
                                    Position="BottomRight" Animation="None" HideDelay="1000" AutoCloseDelay="3500" Width="150px" ContentScrolling="Auto"
                                        <%#Eval("Description")%> 
                                </telerik:RadToolTip>                         
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <FilterMenu EnableTheming="True" Skin="WebBlue"
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
            </FilterMenu> 
        </telerik:RadGrid> 
    </div> 
    </form> 
</body> 
</html> 
 


VB:
Public Partial Class RGTest 
    Inherits System.Web.UI.Page 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        Dim dt As New DataTable 
 
        dt.Columns.Add("Short_Description"
        dt.Columns.Add("Description"
 
        Dim o(1) As Object 
        For i As Integer = 1 To 6 
            o(0) = "This is the short description" 
            o(1) = "Here is a much much much much much much much much much much much longer description that goes in the popup" 
 
            dt.Rows.Add(o) 
        Next 
 
        RadGrid1.MasterTableView.DataSource = dt 
    End Sub 
 
End Class 

Tervel
Telerik team
 answered on 09 Oct 2008
1 answer
51 views
Getting a javascript error when using a RadTreeView inside a Wizard inside an UpdatePanel inside a RadWindow (whew!). The javascript error is: 'telerik' is undefined. It only breaks in this very specific scenario. All other RadTreeViews and RadWindows are working well throughout the rest of the site.

Thanks for any help.

Jared
Jared Tucker
Top achievements
Rank 1
 answered on 09 Oct 2008
5 answers
133 views
Ok, so here is what's going on.  I created a radgrid with a radtoolbar within it.  When I begin an insert, I wish to make the textbox that appears for the name to have the focus of the page.  Here is what I have thus far.

protected void rgdStatusList_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
        {  
            if ((e.Item is Telerik.Web.UI.GridEditFormInsertItem) && (e.Item.OwnerTableView.IsItemInserted))  
            {  
                Telerik.Web.UI.GridDataInsertItem insertItem = (Telerik.Web.UI.GridDataInsertItem)e.Item;  
                (insertItem["StatusDescription"].Controls[0] as TextBox).Focus();  
            }  
        } 

This is the example I found on this site to set the focus, but that didn't do anything for my grid.  Is there another way to do it?  Thanks.
Sebastian
Telerik team
 answered on 09 Oct 2008
1 answer
83 views
Hi,
I have a radgrid (2008.1.619.20) with the self-hierarchy.  I used it to display the messages and replies of a forum. 
I want to sort messages by date, the parents being sorted by date descending and the replies by date ascending.

Is this possible to do this with the radgrid ?

Thanks,
Simon
Yavor
Telerik team
 answered on 09 Oct 2008
3 answers
137 views
I am having the slider issue in Rad grid Control.
I am able to view my first page without any issues but when I try to go the second page.It says there is no records to display .Even though there are record available in backend.
Can Some one help me...
Daniel
Telerik team
 answered on 09 Oct 2008
1 answer
79 views
Hello all

When we set 

AllowFilteringByColumn=true


user can filetering data
now i want create filter string and call filter function
without set AllowFilteringByColumn

can i do this?

All the best
Davari

Daniel
Telerik team
 answered on 09 Oct 2008
4 answers
303 views
I'm looking at the Telerik PDF Demo at:

http://demos.telerik.com/aspnet/prometheus/Grid/Examples/GeneralFeatures/PdfExport/DefaultCS.aspx

When I click the PDF button, I get dialog and a download progress bar for about 604kb, but the resulting file is blank when viewed.

I use the Foxit Reader program (v2.2) and get no errors. If I attempt to open the file with Acrobat Reader 4.0, I get an error #117.

I've also tried doing a PDF export on my own PC and it was blank too.

What might be causing this problem with your demo and how can I work around it?

- Simon
Simon
Top achievements
Rank 1
 answered on 09 Oct 2008
1 answer
181 views
The forum community has been so helpful so far, and I hope you can help me with the following problem I am having...

I am not doing automatic updates or inserts. I have a stored procedure executing in the code-behind to perform my update and inserts. Besides doing the save for the update or insert, the stored procedure returns a dataset with the status of the save and an message to print after the save (successful or an error message).

I use stored procedure for my select command also and I retrieve the results of the stored procedure for my grid, but how can I retrieve the results of the stored procedure doing the insert and the update? I am attaching my code for the aspx defining the dataset, and the codebehind for the insert and update.

Codebehind for update and insert:

 protected int Update_User_Calling_StoredProc(string tableName,  string packageCD, int sbOrderDetailID, int nUserID,string sLoginName,
                string sPassword, string sEmail, string sActive)
    {

        // Create Instance of Connection and Command Object
        SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ContentCentralConnectionString"].ConnectionString);

        SqlCommand myCommand = new SqlCommand("isp_sbUpdateNewsTradePkgsSave", myConnection);
        // Mark the Command as a SPROC
        myCommand.CommandType = CommandType.StoredProcedure;

        // Add Parameters to SPROC
        SqlParameter parameterTableName = new SqlParameter("@temptablename", SqlDbType.NVarChar, 200);
        parameterTableName.Value = tableName;
        myCommand.Parameters.Add(parameterTableName);

        SqlParameter parameterODID = new SqlParameter("@sbODID", SqlDbType.Int, 4);
        parameterODID.Value = sbOrderDetailID;
        myCommand.Parameters.Add(parameterODID);

        SqlParameter parameterUserID = new SqlParameter("@user_id", SqlDbType.Int, 4);
        parameterUserID.Value = nUserID;
        myCommand.Parameters.Add(parameterUserID);

        SqlParameter parameterPackageCD = new SqlParameter("@package_cd", SqlDbType.NVarChar, 20);
        parameterPackageCD.Value = packageCD;
        myCommand.Parameters.Add(parameterPackageCD);

        SqlParameter parameterLoginName = new SqlParameter("@login_name", SqlDbType.NVarChar, 20);
        parameterLoginName.Value = sLoginName;
        myCommand.Parameters.Add(parameterLoginName);

        SqlParameter parameterPassword = new SqlParameter("@password", SqlDbType.NVarChar, 20);
        parameterPassword.Value = sPassword;
        myCommand.Parameters.Add(parameterPassword);

        SqlParameter parameterEmail = new SqlParameter("@email", SqlDbType.NVarChar, 20);
        parameterEmail.Value = sEmail;
        myCommand.Parameters.Add(parameterEmail);

        SqlParameter parameterActive = new SqlParameter("@active", SqlDbType.NVarChar, 20);
        parameterActive.Value = Convert.ToInt32(sActive.ToString());
        myCommand.Parameters.Add(parameterActive);

        try
        {
            myConnection.Open();
            myCommand.ExecuteNonQuery();
            myConnection.Close();
            return (0);
        }
        catch (Exception e)
        {
            int x = 1;
            return (1);
        }
    }
    
    protected int Insert_User_Calling_StoredProc(string tableName, string sSAPID, string spackageCD, string sLoginName,string sPassword,
                   string sEmail, int nActive, int nOrderID, int nProductID )
    {

        // Create Instance of Connection and Command Object
        SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ContentCentralConnectionString"].ConnectionString);

        SqlCommand myCommand = new SqlCommand("isp_sbInsertNewsTradePkgs", myConnection);
        // Mark the Command as a SPROC
        myCommand.CommandType = CommandType.StoredProcedure;

        // Add Parameters to SPROC
        SqlParameter parameterTableName = new SqlParameter("@temptablename", SqlDbType.NVarChar, 200);
        parameterTableName.Value = tableName;
        myCommand.Parameters.Add(parameterTableName);

        SqlParameter parameterSAPID = new SqlParameter("@SAPID", SqlDbType.NVarChar, 20);
        parameterSAPID.Value = sSAPID;
        myCommand.Parameters.Add(parameterSAPID);

        SqlParameter parameterPackageCD = new SqlParameter("@package_cd", SqlDbType.NVarChar, 20);
        parameterPackageCD.Value = spackageCD;
        myCommand.Parameters.Add(parameterPackageCD);

        SqlParameter parameterLoginName = new SqlParameter("@login_name", SqlDbType.NVarChar, 20);
        parameterLoginName.Value = sLoginName;
        myCommand.Parameters.Add(parameterLoginName);

        SqlParameter parameterPassword = new SqlParameter("@password", SqlDbType.NVarChar, 20);
        parameterPassword.Value = sPassword;
        myCommand.Parameters.Add(parameterPassword);

        SqlParameter parameterEmail = new SqlParameter("@email", SqlDbType.NVarChar, 20);
        parameterEmail.Value = sEmail;
        myCommand.Parameters.Add(parameterEmail);

        SqlParameter parameterActive = new SqlParameter("@active", SqlDbType.Int, 4);
        parameterActive.Value = nActive;
        myCommand.Parameters.Add(parameterActive);

        SqlParameter parameterOrderID = new SqlParameter("@sbOrderID", SqlDbType.Int, 4);
        parameterOrderID.Value = nOrderID;
        myCommand.Parameters.Add(parameterOrderID);

        SqlParameter parameterProductID = new SqlParameter("@sbProductID", SqlDbType.Int, 4);
        parameterProductID.Value = nProductID;
        myCommand.Parameters.Add(parameterProductID);


        try
        {
            myConnection.Open();
            myCommand.ExecuteNonQuery();
            myConnection.Close();
            return (0);
        }
        catch (Exception e)
        {
            int x = 1;
            return (1);
        }
    }



ASPX:


<asp:SqlDataSource ID="ContentCentralUsers" runat="server"
        ConnectionString="<%$ ConnectionStrings:ContentCentralConnectionString %>"
        
        SelectCommand="isp_sbLoadUserData"

        SelectCommandType="StoredProcedure" >
       
                
        <SelectParameters>
            <asp:QueryStringParameter Name="SAPID" QueryStringField="SAPID" Type="String" />
            <asp:QueryStringParameter Name="sbODID" QueryStringField="sbODID" Type="Int32" />
        </SelectParameters>
        

        
    </asp:SqlDataSource>


<telerik:RadGrid ID="usersGrid" runat="server"  
       DataSourceID="ContentCentralUsers" GridLines="None" Skin="Office2007"
            AutoGenerateColumns="False"
            ondatabound="usersGrid_DataBound" onitemdatabound="usersGrid_ItemDataBound"
                       onitemevent="usersGrid_ItemDataBound"
                oniteminserted="usersGrid_ItemInserted" onitemupdated="usersGrid_ItemUpdated"
                onload="usersGrid_Load" ondatabinding="usersGrid_DataBinding"  ShowStatusBar="True"
                 OnPreRender="usersGrid_PreRender"
                oninsertcommand="usersGrid_InsertCommand" onitemcreated="usersGrid_ItemCreated"
                onpageindexchanged="usersGrid_PageIndexChanged" OnItemCommand="usersGrid_ItemCommand"
                onupdatecommand="usersGrid_UpdateCommand"   commanditemdisplay="TopAndBottom"
                onselectedindexchanged="usersGrid_SelectedIndexChanged" >
       
     
       <MasterTableView  DataSourceID="ContentCentralUsers"
             AllowFilteringByColumn="True" AllowSorting="True"   
              InsertItemPageIndexAction="ShowItemOnFirstPage" CommandItemDisplay="Top"
             NoMasterRecordsText="No users to display.">
            <CommandItemSettings AddNewRecordText="Add new user"  />
            
            <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
   
            <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            
   
     <Columns>
        <telerik:GridEditCommandColumn ButtonType="ImageButton"  UniqueName="EditCommandColumn1">
                    <HeaderStyle Width="20px" />
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="user_id" UniqueName="user_id" Visible="false" ReadOnly="true" ></telerik:GridBoundColumn>
        <telerik:GridTemplateColumn HeaderText="Seat(User)" SortExpression="login_name" UniqueName="login_name" >
          <ItemTemplate>
             <asp:Label ID="login_name"   runat="server"  Text='<%#Eval("login_name") %>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>
             <asp:TextBox Text='<%#Eval("login_name") %>'  runat="server"  OnTextChanged="change_loginName"></asp:TextBox>
          </EditItemTemplate>
        </telerik:GridTemplateColumn>
        
        <telerik:GridTemplateColumn HeaderText="Password" SortExpression="password" UniqueName="password"  EditFormColumnIndex="1" AllowFiltering="false">
          <ItemTemplate>
             <asp:Label ID="password"   runat="server"  Text='<%#Eval("password") %>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>
             <asp:TextBox ID="TextBox1" Text='<%#Eval("password") %>'  runat="server"  OnTextChanged="change_Password" ></asp:TextBox>
          </EditItemTemplate>
        </telerik:GridTemplateColumn>
        
        <telerik:GridTemplateColumn HeaderText="Email" SortExpression="email" UniqueName="email" >
          <ItemTemplate>
             <asp:Label ID="email"   runat="server"  Text='<%#Eval("email") %>'></asp:Label>
          </ItemTemplate>
          <EditItemTemplate>
             <asp:TextBox ID="TextBox2" Text='<%#Eval("email") %>'  runat="server"  OnTextChanged="change_email"></asp:TextBox>
          </EditItemTemplate>
        </telerik:GridTemplateColumn>
        

        <telerik:GridTemplateColumn HeaderText="Package"  UniqueName="RadComboPackage" EditFormColumnIndex="1" >
                       <HeaderStyle Width="100%" />
                        <ItemTemplate>
                            <asp:Label runat="server" ID="Label1" Text='<%#Eval("package_name") %>'></asp:Label>
                            <telerik:RadToolTip runat="server" ID="RadToolTi

Kiara
Top achievements
Rank 1
 answered on 09 Oct 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?