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

Hello,
I have two RadCombo boxes on my page, I have customText = true for both the RadCombo boxes. Also, I have implemented the code for the client side OnClientKeyPressing & OnBlur events. In OnClientKeyPressing event I check if the user has hit the "Enter" key and if so, I am shifting the focus to the second RadCombo. The focus moves to the next Radcombo box as expected but it don't trigger the OnBlur of the First Radcombo box.

What should be done so that the OnBlur event of the first combo box is called when the focus moves to the second combo box.

Thanks,
Rajiv

 

Jose
Top achievements
Rank 2
 answered on 14 Jul 2009
0 answers
79 views
Hi,
I created a three column template and uploaded it to sitefinity. It uploaded successfully but when I open it it gives me server error.I dont understand what the problem is.Could you please help me.
sree devi
Top achievements
Rank 1
 asked on 14 Jul 2009
3 answers
181 views
Hi

I have a date picker for which the calendar icon is not shown but it pops up when you click in the textbox. This is achieved using javascript like so

 

function ToggleStartDateCalendarPopup()

 

{

$find(

 

"<%= dpStartDate.ClientID %>").showPopup();

}

 

<telerik:RadDatePicker ID="dpStartDate"

 

 

runat="server">

 

 

 

 

 

 

<DatePopupButton Visible="False"></DatePopupButton>

 

<DateInput onclick="ToggleStartDateCalendarPopup()">

 

 

</DateInput>
</
telerik:RadDatePicker>

This works fine but I wanted to put the javascript into an include file. However the code stops working when I do this and I get this error

Message: 'null' is null or not an object

I also tried adding the javascript using registerclientscriptblock but got the same error message

 

Dim s As New StringBuilder

 

s.AppendLine(

"<script>")

 

s.AppendLine(

"function ToggleStartDateCalendarPopup(){")

 

s.AppendLine(

"$find(""<%= dpStartDate.ClientID %>"").showPopup();}")

 

s.AppendLine(

"function ToggleEndDateCalendarPopup(){")

 

s.AppendLine(

"$find(""<%= dpEndDate.ClientID %>"").showPopup();}")

 

s.AppendLine(

"</script>")

 

 

If Not Page.IsPostBack Then

 

 

 

 

'Page.ClientScript.RegisterClientScriptInclude("DatePopups", ResolveClientUrl("~/JavaScript/DatePopups.js"))

 

 

 

Page.ClientScript.RegisterStartupScript(

Me.GetType(), "DatePopup", s.ToString)

 

 

The error is presumably because of the data binding expressions. How can i fix this so I can have my javascript in an include file that can be shared among pages?

thansk

 

 

 

 

 

 

andieje
Top achievements
Rank 1
 answered on 14 Jul 2009
4 answers
219 views
Hi,
I'm trying to get my website to the point where it is WCAG 2.0 AA compliant.
To achieve this, checkboxes need to have associated labels. If I could allocate an ID to each checkbox within the treeview I could then force the the label via the name parameter when creating the node but I cannot see how to allocate that ID.
Ie.
From this
<input type="checkbox" checked="checked" />
<span class="TreeNode" title="Details of Internal Organisational Strucutre">Internal Organisational Structure 3</span>
To
<input type="checkbox" checked="checked" id = "chkone"/>
<span class="TreeNode" title="Details of Internal Organisational Strucutre">
<label for = "chkone">Internal Organisational Structure 3</label>
</span>

Is there a better/any way of doing this?
Thanks
Philip Jones
Top achievements
Rank 1
 answered on 14 Jul 2009
1 answer
117 views
Hi,

I  have followed the article below

http://www.telerik.com/community/code-library/aspnet-ajax/grid/storing-multiple-grid-settings-in-database-via-profile.aspx

I have everything working apart from the persistance of the visibility of the columns.
After extensive de-bugging and attempting other things by biggest problem is that the header context menu does not post-back for any of the column visbility settings, only the sorting / filtering / group by. Without the post-back, the render method does not get called and the settings are not saved.

I have included my RadGrid aspx code.

 

<telerik:RadGrid AutoGenerateColumns="false" DataSourceID="sqlTradeList" AllowFilteringByColumn="true"

 

 

ID="RadGrid1" runat="server" AllowPaging="true" ShowGroupPanel="true" AllowSorting="true"

 

 

EnableViewState="false" Width="80%">

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

<MasterTableView TableLayout="Auto" EnableHeaderContextMenu="true">

 

 

<Columns>

 

 

<telerik:GridHyperLinkColumn HeaderText="TradeId" DataTextField="TradeId" SortExpression="TradeId"

 

 

DataNavigateUrlFormatString="~/Trade/PackageDetails.aspx?InternalPackageId={0}&PackageId={1}"

 

 

DataNavigateUrlFields="InternalPackageId,PackageId" />

 

 

<telerik:GridDateTimeColumn HeaderText="Trade Date" DataField="TradeDate" DataFormatString="{0:dd/MM/yyyy}"

 

 

SortExpression="TradeDate" />

 

 

<telerik:GridBoundColumn HeaderText="Source System" DataField="SourceSystemName"

 

 

SortExpression="SourceSystemName" />

 

 

<telerik:GridBoundColumn HeaderText="Asset Class" DataField="AssetClass" SortExpression="AssetClass" />

 

 

<telerik:GridBoundColumn HeaderText="Product" DataField="ProductName" SortExpression="ProductName" />

 

 

<telerik:GridBoundColumn HeaderText="Trader" DataField="TraderName" SortExpression="TraderName" />

 

 

<telerik:GridDateTimeColumn HeaderText="Last Updated" DataField="LastUpdated" DataFormatString="{0:dd/MM/yyyy mm:hh:ss}"

 

 

SortExpression="LastUpdated" />

 

 

<telerik:GridBoundColumn HeaderText="Version" DataField="TradeVersion" SortExpression="TradeVersion" />

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderContextMenu >

 

 

</HeaderContextMenu>

 

 

<ClientSettings AllowColumnsReorder="true" AllowColumnHide="true">

 

 

<ClientEvents />

 

 

</ClientSettings>

 

 

<GroupingSettings ShowUnGroupButton="true" />

 

 

</telerik:RadGrid>

 


Please can someone have a look and let me know where I am going wrong...

Cheers,

Paddy Watts
Georgi Krustev
Telerik team
 answered on 14 Jul 2009
10 answers
401 views
Quite simply, I can't get this to work.

I've had a search through the forum and it appears that this was a problem back in late '07 and was logged as something that needed fixing.

Has it been?

I'm currently just trying to get the automatic tooltip (the one declared for the RadDatePicker) on the page.

--
Stuart
hubert
Top achievements
Rank 1
 answered on 14 Jul 2009
3 answers
174 views
Hi there,

I see a lot of posts in this forum about the ReadOnlyFileInputs property set to true, but I'm actually looking for the opposite.

The problem is that the behavior seems to be inconsistent across browsers.

In FF3, the field is not editable at all, and even if the property is set to false, clicking inside the text box results in a file selection dialog.

In IE7, the field is editable, but if an invalid name is typed in manually, either a Javascript error occurs or the UploadedFiles property indicates that a 0 byte file with the invalid name was uploaded upon submission of the form.

Any way to get around the inconsistencies besides setting the ReadOnlyFileInputs property to false?

Thanks,
Mark
Genady Sergeev
Telerik team
 answered on 14 Jul 2009
1 answer
201 views
Hi Guys
 I'm having a bit of a problem getting my rad grid to update, Delete, and Insert new records, i'm usnig RadGrid1_NeedDataSource to bind a datasource to the grid, first i'm selecting different query strings from a dropdown list to populate the datasource, this works great..how do i get my grid to insert,update and delete, taking into consideration i'm usig 1 grid for different queries.
i'll paste my code below.

using System; 
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; 
using System.Data.SqlClient; 
using Telerik.Web.UI; 
using System.Collections.Generic; 
 
 
public partial class Grid : System.Web.UI.Page 
{ 
    string tbName; 
    protected void Page_Load(object sender, EventArgs e) 
    { 
         
        if (Session["ID"] != null) 
        { 
            tbName = Request["id"].ToString(); 
            if (!Page.IsPostBack) 
            { 
    
                ViewState["tbName"] = tbName; 
            } 
            else 
            { 
 
 
            }   
        } 
 
        else 
        { 
            Response.Redirect("login.aspx"); 
        } 
    } 
 
    protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
 
        string sql = @"Select * from " + ViewState["tbName"].ToString() ; 
        SqlConnection oCon = new SqlConnection(DatabaseConnection.ConnectionString); 
        SqlCommand cmd = new SqlCommand(sql, oCon); 
        cmd.CommandType = CommandType.Text; 
        DataTable tblData = new DataTable(); 
        new SqlDataAdapter(cmd).Fill(tblData); 
        RadGrid1.DataSource = tblData; 
    } 
 
    bool isGrouping = false; 
    protected void RadGrid1_GroupsChanging(object source, GridGroupsChangingEventArgs e) 
    { 
        isGrouping = true; 
        if (e.Action == GridGroupsChangingAction.Ungroup && RadGrid1.CurrentPageIndex > 0) 
        { 
            isGrouping = false; 
        } 
    } 
 
} 
 

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Grid" Title="Untitled Page" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> 
    <style type="text/css"> 
 
 
.RadGrid_Default 
{ 
    border:1px solid #232323; 
} 
 
.RadGrid_Default 
{ 
    font:11px/1.4 arial,sans-serif; 
} 
 
.RadGrid_Default 
{ 
    background:#d4d0c8; 
    color:#333; 
} 
 
.GroupPanel_Default 
{ 
    border-top:1px solid #383838; 
    background:url('mvwres://Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.sprite.gif') repeat-x 0 -400px #1f1f1f; 
    color:#8f8f8f; 
} 
 
.MasterTable_Default 
{ 
    background:#fff; 
    border-collapse:separate !important; 
} 
 
.MasterTable_Default 
{ 
    font:11px/1.4 arial,sans-serif; 
} 
 
.GridHeader_Default 
{ 
    color:#fff; 
    text-decoration:none; 
} 
 
.GridHeader_Default 
{ 
    border-bottom:1px solid #010101; 
    background:url('mvwres://Telerik.Web.UI, Version=2008.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.headers.gif') repeat-x #434343; 
    padding:10px 6px 10px 11px; 
    text-align:left; 
    font-size:1.3em; 
    font-weight:normal; 
} 
 
        #Table3 
        { 
            width: 681px; 
        } 
         
    .style2 
    { 
        height: 28px; 
    } 
         
    </style> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
 
    <table style="width: 100%;"> 
        <tr> 
            <td class="style2"> 
                </td> 
        </tr> 
        <tr> 
            <td> 
                &nbsp;</td> 
        </tr> 
        <tr> 
            <td> 
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"  
                    AllowPaging="True"  AutoGenerateDeleteColumn="True"  
                    AutoGenerateEditColumn="True" GridLines="None" Skin="Vista"  
                    OnNeedDataSource="RadGrid1_NeedDataSource"  
                    OnGroupsChanging="RadGrid1_GroupsChanging" AllowAutomaticDeletes="True"  
                    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" 
            OnItemDeleted="RadGrid1_ItemDeleted" OnItemInserted="RadGrid1_ItemInserted" > 
<HeaderContextMenu> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</HeaderContextMenu> 
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> 
<MasterTableView CommandItemDisplay="Top" EditMode ="PopUp" AllowFilteringByColumn="True" > 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
 
                    <ClientSettings AllowKeyboardNavigation="True"> 
                        <Selecting AllowRowSelect="True" /> 
                    </ClientSettings> 
 
<FilterMenu> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
                </telerik:RadGrid> 
            </td> 
        </tr> 
    </table> 
 
    </asp:Content> 
Georgi Krustev
Telerik team
 answered on 14 Jul 2009
3 answers
120 views
My company does not want to have header text on a button column since each button is going to display "Edit" or "Remove". Is there a way to hide this text yet keep the column displayed?
Raventhorn
Top achievements
Rank 2
 answered on 14 Jul 2009
1 answer
69 views
We are working on a solution that allows the user to turn on the RadDocks and move content modules from zone to zone. When they move a Dock, I am saving it's position to the database on DockPositionChanged event. Everything works fine except that I cant move the same dock more than once without refreshing the page. If I move it once, it saves it's position and all the other dock's positions are updated as well. But if I move it a second time, every dock is updated but the one I moved. If I move Dock 1, then move Dock 2, then move Dock 1 again, it works fine. It does not work if I move Dock 1, then Move Dock 1 again. It acts as though Dock1 isn't contained in the collection.

UPDATE: After tracing the event in Sql Server Profiler, I see that the event for Dock1 is fired when it is moved the second time, but it is not using the correct DockZoneID. It is still using the DockZoneID of the DockZone that I moved it to the first time.
Pero
Telerik team
 answered on 14 Jul 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?