Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views

Hi

I have a scary situation when i use RadPanelBar

Below is Simple aspx page  

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._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></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <table> 
    <tr> 
    <td> 
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadPanelBar ID="RadPanelBar1" runat="server">  
            <Items> 
                <telerik:RadPanelItem runat="server" Text="LargeMenu">  
                    <Items> 
                        <telerik:RadPanelItem runat="server" Text="SubMenu1">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="SubMenu2">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelBar>      
    </div> 
    </td> 
    <td> 
      <div > 
         <iframe  id="LinkFrame"  src="http://www.google.com"  />/>  
      </div> 
    </td> 
    </tr> 
    </table> 
    </form> 
</body> 
</html> 
 

In this page RadPanel is not working  I can't expand Root Node
But if i eliminate iframe (ID="LinkFrame") RadPanel works fine as i expected .

Am i missing Something?

Regards,
Park

PS:
After i posted i put runat="server" in iframe tag it works fine But i don't get what runat="server" make a difference
I worked with java and jsp this is the first time of aspx project


Atanas Korchev
Telerik team
 answered on 06 Nov 2009
1 answer
110 views
Sorry, the subject is not right, the paging is working just not quickly.

Hello, does anyone have suggestions on a better way to do the following?  I'm not sure if I'm using the most efficient approach.

Here's my datagrid:

<div style="background: url(/images/gridbg.jpg) no-repeat; width: 740px"> 
    <div style="float: right; margin: 10px 10px 5px 0px; color: #2a6ca3; font-size: 11px; 
        vertical-align: middle;"> 
        <table cellpadding="0" cellspacing="0"> 
            <tr valign="middle"> 
                <td> 
                    <asp:Label ID="lblFilter" runat="server" Text="Filter:"></asp:Label></td> 
                <td style="padding-left: 5px;"> 
                    <telerik:RadComboBox ID="rcbFieldName" Skin="Telerik" runat="server"> 
                        <Items> 
                            <telerik:RadComboBoxItem Text="Branch" Value="Branch" runat="server" /> 
                            <telerik:RadComboBoxItem Text="Employee Name" Value="Employee Name" runat="server" /> 
                        </Items> 
                        <CollapseAnimation Duration="200" Type="OutQuint" /> 
                    </telerik:RadComboBox> 
                </td> 
                <td style="padding-left: 5px;"> 
                    <asp:TextBox ID="txtSearch" runat="server" Style="vertical-align: middle"></asp:TextBox></td> 
                <td style="padding-left: 5px;"> 
                    <asp:ImageButton ID="btnSearch" runat="server" ImageUrl="/images/FilterGo.gif" /></td> 
                <td style="padding-left: 5px;"> 
                    <asp:ImageButton ID="btnShowAll" runat="server" ImageUrl="/images/FilterCancel.gif" 
                        AlternateText="Cancel Filter / Show All" /></td> 
            </tr> 
        </table> 
    </div> 
    <div class="buttonTop" style="margin-top: 10px; margin-left: 10px;"> 
        <table cellpadding="0" cellspacing="0"> 
            <tr valign="middle"> 
                <td> 
                    <asp:ImageButton runat="server" ID="ImageExport" AlternateText="Export to Excel" 
                        ImageUrl="/images/FileManager/Icons/xls.gif" /> 
                    <asp:ImageButton OnClientClick="CustomAction(); return false;" runat="server" ID="ImageButton1" 
                        AlternateText="Export to Excel" ImageUrl="/images/FileManager/Icons/xls.gif" 
                        Visible="false" /></td> 
                <td style="padding-left: 5px;"> 
                    Export to Excel</td> 
            </tr> 
        </table> 
    </div> 
    <div style="clear: both;"> 
    </div> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="10"> 
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AllowPaging="True" 
        AllowSorting="true" AutoGenerateColumns="false" GridLines="None" Skin="Outlook"> 
        <MasterTableView DataKeyNames="CuId,BarcodeID"> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <NestedViewTemplate> 
                <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false"> 
                    <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("BarcodeID") %>' 
                        Visible="false" runat="server" /> 
                    <telerik:RadGrid runat="server" ID="ResponseGrid" DataSourceID="SqlDataSource2" AllowSorting="true"> 
                        <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" 
                            DataKeyNames="BarcodeID" PageSize="5"> 
                            <Columns> 
                                <telerik:GridBoundColumn SortExpression="BarcodeID" HeaderText="ID" HeaderButtonType="TextButton" 
                                    DataField="BarcodeID" UniqueName="BarcodeID"> 
                                    <HeaderStyle /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="MemberName" HeaderText="Member Name" HeaderButtonType="TextButton" 
                                    DataField="MemberName" UniqueName="MemberName"> 
                                    <HeaderStyle /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="EmailAddress" HeaderText="Email Address" 
                                    HeaderButtonType="TextButton" DataField="EmailAddress" UniqueName="EmailAddress"> 
                                    <HeaderStyle /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="EmployeeName" HeaderText="Employee Name" 
                                    HeaderButtonType="TextButton" DataField="EmployeeName" UniqueName="EmployeeName"> 
                                    <HeaderStyle /> 
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn SortExpression="BranchName" UniqueName="BranchName" HeaderButtonType="TextButton" 
                                    DataField="BranchName" HeaderText="Branch Name"> 
                                    <HeaderStyle /> 
                                </telerik:GridBoundColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 
                    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" 
                        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CE_SurveyResponseCuId WHERE BarcodeID = @BarcodeID" 
                        runat="server"> 
                        <SelectParameters> 
                            <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="BarcodeID" /> 
                        </SelectParameters> 
                    </asp:SqlDataSource> 
                </asp:Panel> 
            </NestedViewTemplate> 
            <Columns> 
                <telerik:GridDateTimeColumn UniqueName="Receipt" HeaderText="Date<br>Received" DataField="Receipt" 
                    DataFormatString="{0:MM/dd/yyyy}"> 
                    <HeaderStyle Width="100px" HorizontalAlign="center" /> 
                </telerik:GridDateTimeColumn> 
                <telerik:GridDateTimeColumn UniqueName="TransDate" HeaderText="Transaction<br>Date" 
                    DataField="TransDate" DataFormatString="{0:MM/dd/yyyy}"> 
                    <HeaderStyle Width="100px" HorizontalAlign="center" /> 
                </telerik:GridDateTimeColumn> 
                <telerik:GridBoundColumn DataField="Question1" DataType="System.Double" HeaderText="Qu<br />1" 
                    UniqueName="Question1"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question2" DataType="System.Double" HeaderText="Qu<br />2" 
                    SortExpression="Question2" UniqueName="Question2"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question3" DataType="System.Double" HeaderText="Qu<br />3" 
                    SortExpression="Question3" UniqueName="Question3"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question4" DataType="System.Double" HeaderText="Qu<br />4" 
                    SortExpression="Question4" UniqueName="Question4"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question5" DataType="System.Double" HeaderText="Qu<br />5" 
                    SortExpression="Question5" UniqueName="Question5"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question6" DataType="System.Double" HeaderText="Qu<br />6" 
                    SortExpression="Question6" UniqueName="Question6"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question7" DataType="System.Double" HeaderText="Qu<br />7" 
                    SortExpression="Question7" UniqueName="Question7"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question8" DataType="System.Double" HeaderText="Qu<br />8" 
                    SortExpression="Question8" UniqueName="Question8"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question9" DataType="System.Double" HeaderText="Qu<br />9" 
                    SortExpression="Question9" UniqueName="Question9"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Question10" DataType="System.Double" HeaderText="Qu<br />10" 
                    SortExpression="Question10" UniqueName="Question10"> 
                    <HeaderStyle HorizontalAlign="center" Width="30px" /> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Comments" HeaderText="Comments" SortExpression="Comments" 
                    UniqueName="Comments"> 
                    <HeaderStyle HorizontalAlign="center" /> 
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
</div> 
 



Here's my code:

        Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSearch.Click 
            Dim searchtext As String = Trim(txtSearch.Text.ToString) 
            Literal1.Text &= "searchtext=" & searchtext & "<br>" 
 
            If Len(searchtext) > 0 Then 
                Select Case Me.rcbFieldName.SelectedValue 
                    Case "Branch" 
                        Literal1.Text &= "branch selected<br>" 
                        RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND BranchName = '" & searchtext & "'") 
                        Literal1.Text &= "SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND BranchName = '" & searchtext & "'<br>" 
                        RadGrid1.Rebind() 
                        Session("GridSource") = RadGrid1.DataSource 
                    Case "Employee Name" 
                        Literal1.Text &= "employee name selected<br>" 
                        RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND EmployeeName LIKE '%" & searchtext & "%'") 
                        Literal1.Text &= "SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "') AND EmployeeName LIKE '%" & searchtext & "%'<br>" 
                        RadGrid1.Rebind() 
                        Session("GridSource") = RadGrid1.DataSource 
                End Select 
            End If 
        End Sub 
 
        Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
            If Session("GridSource") Is Nothing Then 
                RadGrid1.DataSource = GetDataTable("SELECT * FROM [tablex] WHERE ([CuId] = '" & ViewState("CuId") & "')") 
                Session("GridSource") = RadGrid1.DataSource 
            Else 
                RadGrid1.DataSource = Session("GridSource") 
            End If 
        End Sub 
 
       Public Function GetDataTable(ByVal query As String) As DataTable 
            Dim ConnString As String = ConfigurationManager.ConnectionStrings("SiteSqlServer").ConnectionString 
            Dim conn As SqlConnection = New SqlConnection(ConnString) 
            Dim adapter As SqlDataAdapter = New SqlDataAdapter 
            adapter.SelectCommand = New SqlCommand(query, conn) 
            Dim table1 As New DataTable 
            conn.Open() 
            Try 
                adapter.Fill(table1) 
            Finally 
                conn.Close() 
            End Try 
            Return table1 
        End Function 
Veli
Telerik team
 answered on 06 Nov 2009
1 answer
249 views
Hi,
I am using Visual Studio 2005, Rad Conrtols for ASP.NET Q1 2008 and .net Framework 2.0 and C# Programming.
I am using RAD Grid to display the data and UserControl Form to Inset/Update the records.
I am aware that it is possible to perform BATCH UPDATES by setting AllowMultipleRowEdit = True.

But I want to perform BATCH INSERT. I am not sure how to do this.
Can you please help me with some online demos or sample code?

Thanks,
RKS
Princy
Top achievements
Rank 2
 answered on 06 Nov 2009
3 answers
135 views
hi

How do i do a related combobox in grid? Both combos have datasource id namely: sdsInventory and sdsSupplier.

When I select a code from the first combo, it will populate the suppliers in the second combo based on the code selected.

How should i go about it? Thanks



 <telerik:GridTemplateColumn DataField="Code" HeaderText="Code"
            SortExpression="Code" UniqueName="Code">
            <EditItemTemplate>
                <telerik:RadComboBox ID="drps"  DataSourceID="sdsInventory" DataTextField="Name" DataValueField="Code" selectedValue='<%# Bind("Code") %>' runat="server" Width="300px" Filter="StartsWith" AutoCompleteSeparator=";" MarkFirstMatch="True">
                </telerik:RadComboBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="CodeLabel" runat="server" Text='<%# Eval("Code") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Supplier_ID" HeaderText="Supplier Name"
            SortExpression="Supplier_ID" UniqueName="Supplier_ID">
            <EditItemTemplate>
                <telerik:RadComboBox ID="drpSupplier" DataSourceID="sdsSupplier" DataTextField="Supplier_Name" DataValueField="Supplier_ID" selectedvalue='<%# Bind("Supplier_ID") %>' runat="server" Width="300px">
                </telerik:RadComboBox>
             </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Supplier_IDLabel" runat="server"
                    Text='<%# Eval("Supplier_Name") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
Princy
Top achievements
Rank 2
 answered on 06 Nov 2009
1 answer
146 views
Hi, we are running Telerik on a security test tools which use Http request manually to bypass the GUI and javascript control.
(To simulate a hacker)

And we have a Telerik exception on radcalendar :

Here is the Log :
--------------------------
Thread information:
    Thread ID: 6
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at Telerik.Web.UI.RadDateInput.RangeTextProperty(String value)
   at Telerik.Web.UI.RadDateInput.set_Text(String value)
   at Telerik.Web.UI.DatePickingInput.LoadPostData(String postDataKey, NameValueCollection postCollection)
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
------------------------------

There were an incorrect date input forced in the HttpRequest to the server who create an error.

How can i prevent it from happening ?
How can i manage this exception ? I have no clues and i really dont understand what happens.
Tgaud
Top achievements
Rank 1
 answered on 06 Nov 2009
1 answer
159 views
Is it possible to change the height of a radpanelitem when it is expanded?  It is too large for what we are using it for.
Yana
Telerik team
 answered on 06 Nov 2009
2 answers
294 views
I am using a RadGrid and the advanced data binding method via the NeedDataSource event. I am actually using this same setup in several areas of my app, but this is the only one that is behaving incorrectly. I am also using EditFormSettings with EditFormType="Template", and I have a GridTemplateColumn which has a button whose CommandName is RadGrid.EditCommandName. This causes my edit form template to show, and that works correctly. The template contains a button with CommandName of RadGrid.UpdateCommandName.

This is where the problem occurs, because NeedDataSource fires with RebindReason of GridRebindReason.InitialLoad BEFORE the UpdateCommand event fires. UpdateCommand does fire, and I am able to get values from my edit form template and save correctly, but because NeedDataSource fires before that, the Grid row of the item that was just edited shows the old values after it hides the edit form. I have tried calling Rebind after saving in my UpdateCommand handler, but that has no effect.

Any help is greatly appreciated.
Veli
Telerik team
 answered on 06 Nov 2009
0 answers
184 views

Improve you web page load time with the flexible, lightweight RadSiteMap control for ASP.NET AJAX. This UI component with its efficient semantic rendering gives you a lightning fast solution and highly optimized HTML output. With the ease of Telerik’s SiteMap for ASP.NET AJAX you can organize and list the pages on your web site, customize the layout, choose from a variety of appearance options and templates. Add value to your web site by optimizing it for crawler and search engines with no extra development effort. 

 

Semantic Rendering for Minimal HTML
The Telerik ASP.NET SiteMap implements a highly efficient semantic rendering, which results in minimum HTML output and dramatically improves performance.

 

Flexible layouts
You can configure the layout of RadSiteMap in a variety of modes. The nodes can be viewed in either list or flow state. By selecting the flow property items in the group will be arranged in rows one after the other, instead of displaying them as a list. End-users can also alternate between single, multi-column, horizontal or vertical view. In addition you can display node lines in a fashion similar to RadTreeView and collapse the hierarchy.

Templates
The ASP.NET SiteMap by Telerik allows you to define a collection of dynamic templates that customize the presentation of the hierarchy and the individual nodes. You can apply per-level, per-node and global templates and add extra information, such as images, links to additional sources, etc.

 

Appearance
RadSiteMap is shipped with a rich set of skins that allow you to easily build slick interfaces with the look-and-feel of Windows Vista, Office 2007, Outlook, etc. The skins can be easily switched using a single property. This significantly simplifies styling even for complex configurations.

 

Industry-Best Cross-Browser Support
Following our long tradition of industry best cross-browser support, Telerik ASP.NET SiteMap doesn’t make an exception. The component supports all major browsers, including Internet Explorer, Firefox, Safari, Opera and Google Chrome and produces identical results.

Search Engine Friendly
RadSiteMap completely follows the principles of Search Engine Optimization. The control's innovative rendering generates semantic lists and standard <a> tags, which are properly recognized and highly valued by search engines. As a result, all content accessible through this control will be automatically indexed and ranked with no extra effort required from the developer.

 

Codeless Test Automation for RadSiteMap
Now you can record, execute and debug functional tests for RadSiteMap without leaving the familiar Visual Studio environment. Telerik WebUI Test Studio is an advanced click and play web application testing tool specialized for automating ASP.NET AJAX applications. The Studio ships with special translators for Telerik RadControls for ASP.NET AJAX.

To get familiar with the control please follow these online resources:

 

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 06 Nov 2009
1 answer
231 views
We have a hierarchical radgrid with a mastertable and a single detail table.  We need edit/insert functionality on both levels, however, on the second (inner) level, we need to have a different user control for the insert than we need for the edit.  There is a field that we do not want editable but we need input for the insert.

How do I assign a different user control based on whether the user is inserting or editing a record on the inner table?  Is there some way within the user control to know if you are editing or inserting?  if so, I can use the same user control and hide the input control for edits.

I hope this makes sense, I am new to Rad controls.  I appreciate any help.

Thanks
Chuck
Princy
Top achievements
Rank 2
 answered on 06 Nov 2009
3 answers
206 views
Hello:

Can you help me?
I need to bind a GridDropDownColumn

Thanks.
Shinu
Top achievements
Rank 2
 answered on 06 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?