Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi there,

I've been trying to set up RadAjaxManager with masterpage. I create a menu on the masterpage and I want to update only the ContentPlaceHolder, not the entire page.
I send attached a simple example that is not working.

I appreciate any help.

Marcio Nascimento
Schlurk
Top achievements
Rank 2
 answered on 19 Oct 2009
7 answers
188 views
The Property Builder control panel doesn't list the controls on the master page, but you can manually make AjaxSetting entries for those controls.  However, if you do make those entries and open the control panel to add additional entries, the manual entries get erased.  Also, the Property Builder control panel doesn't show list the objects in different <asp:Content> controls of that same web content form.  They can be entered manually as well, but the same issue exists.  The RadAjaxManager Property Builder needs to list all objects on the current web form/master page, as well as all of the parent master pages.
Will
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
136 views
We are using the 2009 Q2 SP1 version  of the ASP.NET AJAX RadControls.  We are including the included Core.js, jQuery.js, and jQueryInclude.js on a master page in an ASP:ScriptManager control.

We are unable to access jQuery JScript Intellisense (Visual Studio Team System 2008 Development Edition, SP1, with Hotfix for Microsoft Visual Studio Team System 2008 Development Edition - ENU (KB946581) KB946581 installed) -- we get the following warning:

Warning 1 Error updating JScript IntelliSense: Telerik.Web.UI.Common.jQuery.js:Telerik.Web.UI: Object doesn't support this property or method @ 18:9345
T. Tsonev
Telerik team
 answered on 19 Oct 2009
3 answers
115 views
Is there a class in themes that just contains the base colors?

I have a form that has a header area on it that should match the feel of the them.  Ideally, I would add class="baseBackground" or something along those lines.
Dimo
Telerik team
 answered on 19 Oct 2009
3 answers
172 views
The issue is I have many RadAjaxPanels of which each can have many controls which cause a postback.  Some of the data in different RadAjaxPanels is dependent on changes that may be made in other RadAjaxPanels.  Therefore I need the dependent panels to postback and update whenever the "Master" panels update.  Currently I am using the RadAjaxManager to dynamicly set the dependencies.  This would be much simpler if I could Simply have one RadAjaxPanel cause a Postback in another RadAjaxPanel. This way I would not have to set each of the 10 or so controls in each of my panels or update the other panels.
Alex Jones
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
230 views
Hi,

We currently have a small problem with datepicker and timepicker after the page is loaded completly both input's control size are shrink to a minimal size. It happen randomly.

If you reload the page, the controls appears normally (with the normal size).

We don't use any css that set min-width for the control's input.

Is that a known issue?

Thx for your time and have a nice day

Guillaume
Dimo
Telerik team
 answered on 19 Oct 2009
1 answer
144 views
I've noticed something strange that happens when the RadDatePicker control is displayed in a frame where the website domains are different.

So here's the situation, my client is in the rental business and they added a link to one of their pages from their site (sterlingvacationhomes.com) on a rental advertising site (vrbo.com). Here is the link: http://www.vrbo.com/global/siteFrame.aspx?l=17509&k=1. Now the page it first shows doesn't have the date picker on it, so you need to click "Make An Inquiry", which brings you to the page where the problem occurs.

Now when you try open the calendar popup, it gives me an "Access Denied" javascript error. This seems to only occurs in IE, as I've tried it in Chrome and the page worked as expected.

Is this some sort of the security setting that IE applies to frames or is it something else?

If you could tell me what the problem could be so that I can tell my client what the situation is.

Thanks.
Dimo
Telerik team
 answered on 19 Oct 2009
3 answers
237 views
Hello,

I have a grid inside a RadPageView.  The grid is set to filter, sort, insert new row, and edit a row.  One of the columns is a dropdown list for the manager name.  I put validation code on all the required columns and everything works until I added validation to the dropdown list.  Why am I getting the following error message?  Thank you very much for your help.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 98:                 invProdNameValidator.ControlToValidate = invProdNameEditor.DropDownListControl.ID;
Line 99:                 invProdNameValidator.ErrorMessage = "* InvProdName is a required filed";
Line 100:                invProdNameCell.Controls.Add(invProdNameValidator);
Line 101:
Line 102:                RequiredFieldValidator riskIdValidator = new RequiredFieldValidator();

Source File: C:\Users\thoeft.ALPHAMETRIX\Documents\Visual Studio 2008\Projects\Risk Maint Portal\Risk Maint Portal\Default.aspx.cs    Line: 100

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Risk_Maint_Portal._Default.RadGrid2_ItemCreated(Object sender, GridItemEventArgs e) in C:\Users\thoeft.ALPHAMETRIX\Documents\Visual Studio 2008\Projects\Risk Maint Portal\Risk Maint Portal\Default.aspx.cs:100
   Telerik.Web.UI.RadGrid.OnItemCreated(GridItemEventArgs e) +126
   Telerik.Web.UI.RadGrid.CallOnItemCreated(GridItemEventArgs e) +39
   Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +365
   Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +979
   Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +187
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1077
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +782
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +28
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +364
   Telerik.Web.UI.GridTableView.Rebind() +98
   Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +395
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Here is the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Risk_Maint_Portal._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">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"
        EnableTheming="True">
    </telerik:RadScriptManager>
    <div>
    
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Height="29px"
            MultiPageID="RadMultiPage1" Skin="Gray" Width="1149px">
            <Tabs>
                <telerik:RadTab runat="server" PageViewID="RadPageView2"
                    Text="Master Contracts">
                </telerik:RadTab>
                <telerik:RadTab runat="server" PageViewID="RadPageView3" Text="Risk Limits">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
            <telerik:RadPageView ID="RadPageView2" runat="server">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:GrapevineConnectionString %>"
                    DeleteCommand="DELETE FROM [master_Contract] WHERE [DWID] = @DWID"
                    InsertCommand="INSERT INTO [master_Contract] ([RiskID], [TFPRID], [ExchCode], [FutCode], [MarketID], [InstType], [ContractDes], [Market], [Sector1], [Sector2]) VALUES (@RiskID, @TFPRID, @ExchCode, @FutCode, @MarketID, @InstType, @ContractDes, @Market, @Sector1, @Sector2)"
                    SelectCommand="SELECT RiskID, TFPRID, ExchCode, FutCode, MarketID, InstType, ContractDes, Market, Sector1, Sector2 FROM master_Contract ORDER BY Market, Sector1"
                    
                    UpdateCommand="UPDATE [master_Contract] SET [RiskID] = @RiskID, [TFPRID] = @TFPRID, [ExchCode] = @ExchCode, [FutCode] = @FutCode, [MarketID] = @MarketID, [InstType] = @InstType, [ContractDes] = @ContractDes, [Market] = @Market, [Sector1] = @Sector1, [Sector2] = @Sector2 WHERE [DWID] = @DWID">
                    <DeleteParameters>
                        <asp:Parameter Name="DWID" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="RiskID" Type="Int32" />
                        <asp:Parameter Name="TFPRID" Type="Int32" />
                        <asp:Parameter Name="ExchCode" Type="String" />
                        <asp:Parameter Name="FutCode" Type="String" />
                        <asp:Parameter Name="MarketID" Type="String" />
                        <asp:Parameter Name="InstType" Type="String" />
                        <asp:Parameter Name="ContractDes" Type="String" />
                        <asp:Parameter Name="Market" Type="String" />
                        <asp:Parameter Name="Sector1" Type="String" />
                        <asp:Parameter Name="Sector2" Type="String" />
                        <asp:Parameter Name="DWID" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="RiskID" Type="Int32" />
                        <asp:Parameter Name="TFPRID" Type="Int32" />
                        <asp:Parameter Name="ExchCode" Type="String" />
                        <asp:Parameter Name="FutCode" Type="String" />
                        <asp:Parameter Name="MarketID" Type="String" />
                        <asp:Parameter Name="InstType" Type="String" />
                        <asp:Parameter Name="ContractDes" Type="String" />
                        <asp:Parameter Name="Market" Type="String" />
                        <asp:Parameter Name="Sector1" Type="String" />
                        <asp:Parameter Name="Sector2" Type="String" />
                    </InsertParameters>
                </asp:SqlDataSource>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView3" runat="server">
                <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                    ConnectionString="<%$ ConnectionStrings:GrapevineConnectionString %>"                    
                    
                    SelectCommand="SELECT DISTINCT c.InvProdName, c.CellID, r.RiskID, r.AverageContracts, r.ContractLimit, r.SpreadLimit, r.StartDate, r.EndDate FROM risk_Limits AS r INNER JOIN cellInfo1 AS c ON r.CellID = c.CellID ORDER BY c.InvProdName, r.RiskID, r.EndDate"></asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSource3" runat="server"
                    ConnectionString="<%$ ConnectionStrings:GrapevineConnectionString %>"
                    SelectCommand="SELECT DISTINCT InvProdName, CellID FROM cellInfo1 WHERE (IsActual = 1)">
                </asp:SqlDataSource>
                <telerik:RadGrid ID="RadGrid2" runat="server" AllowAutomaticDeletes="True"
                    AllowAutomaticInserts="True" AllowFilteringByColumn="True" AllowPaging="True"
                    AllowSorting="True" DataSourceID="SqlDataSource2" GridLines="None"
                    onitemcreated="RadGrid2_ItemCreated"
                    GroupingEnabled="False">
                    <HeaderContextMenu>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </HeaderContextMenu>
                    <MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False"
                        CommandItemDisplay="Top" DataSourceID="SqlDataSource2"
                        GridLines="Both" GroupsDefaultExpanded="False" PageSize="40">
                        <Columns>
                            <telerik:GridEditCommandColumn>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridDropDownColumn UniqueName="InvProdName" ListTextField="InvProdName"
                            ListValueField="InvProdName" DataSourceID="SqlDataSource3" HeaderText="InvProdName"
                            DataField="InvProdName" AllowSorting="true">
                            </telerik:GridDropDownColumn>
                            <telerik:GridBoundColumn DataField="CellID" HeaderText="CellID"
                                SortExpression="CellID" UniqueName="CellID" DataType="System.Int32">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RiskID" DataType="System.Int32"
                                HeaderText="RiskID" SortExpression="RiskID"
                                UniqueName="RiskID">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AverageContracts" DataType="System.Decimal"
                                HeaderText="AverageContracts" SortExpression="AverageContracts"
                                UniqueName="AverageContracts">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ContractLimit" DataType="System.Decimal"
                                HeaderText="ContractLimit" SortExpression="ContractLimit"
                                UniqueName="ContractLimit">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="SpreadLimit" DataType="System.Decimal"
                                HeaderText="SpreadLimit" SortExpression="SpreadLimit"
                                UniqueName="SpreadLimit">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="StartDate" DataType="System.DateTime"
                                HeaderText="StartDate" SortExpression="StartDate" UniqueName="StartDate">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EndDate" DataType="System.DateTime"
                                HeaderText="EndDate" SortExpression="EndDate" UniqueName="EndDate">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="InvProdName" FieldAlias="InvProdName" HeaderText=" " HeaderValueSeparator="" />
                            </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldAlias="InvProdName" FieldName="InvProdName"
                                        FormatString="" HeaderText="" />
                                </GroupByFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                        <EditFormSettings>
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowDragToGroup="True">
                    </ClientSettings>
                    <FilterMenu>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                </telerik:RadGrid>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="i0" />
                    <telerik:AjaxUpdatedControl ControlID="i1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
</html>

Code Behind:
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = e.Item as GridEditableItem;

                GridDropDownListColumnEditor invProdNameEditor = (GridDropDownListColumnEditor)item.EditManager.GetColumnEditor("InvProdName");
                //GridTextBoxColumnEditor invProdNameEditor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("InvProdName");
                GridTextBoxColumnEditor riskIdEditor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("RiskID");
                GridTextBoxColumnEditor startDateEditor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("StartDate");
                GridTextBoxColumnEditor endDateEditor = (GridTextBoxColumnEditor)item.EditManager.GetColumnEditor("EndDate");

                
                TableCell invProdNameCell = (TableCell)invProdNameEditor.DropDownListControl.Parent;
                TableCell riskIdCell = (TableCell)riskIdEditor.TextBoxControl.Parent;
                TableCell startDateCell = (TableCell)startDateEditor.TextBoxControl.Parent;
                TableCell endDateCell = (TableCell)endDateEditor.TextBoxControl.Parent;

                RequiredFieldValidator invProdNameValidator = new RequiredFieldValidator();
                invProdNameEditor.DropDownListControl.ID = "InvProdNameReqValidator";
                invProdNameValidator.ControlToValidate = invProdNameEditor.DropDownListControl.ID;
                invProdNameValidator.ErrorMessage = "* InvProdName is a required filed";
                invProdNameCell.Controls.Add(invProdNameValidator);

                RequiredFieldValidator riskIdValidator = new RequiredFieldValidator();
                riskIdEditor.TextBoxControl.ID = "RiskIDReqValidator";
                riskIdValidator.ControlToValidate = riskIdEditor.TextBoxControl.ID;
                riskIdValidator.ErrorMessage = "* RiskID is a required filed";
                riskIdCell.Controls.Add(riskIdValidator);

                RequiredFieldValidator startDateValidator = new RequiredFieldValidator();
                startDateEditor.TextBoxControl.ID = "StartDateReqValidator";
                startDateValidator.ControlToValidate = startDateEditor.TextBoxControl.ID;
                startDateValidator.ErrorMessage = "* StartDate is a required filed";
                startDateCell.Controls.Add(startDateValidator);

                RequiredFieldValidator endDateValidator = new RequiredFieldValidator();
                endDateEditor.TextBoxControl.ID = "EndDateReqValidator";
                endDateValidator.ControlToValidate = endDateEditor.TextBoxControl.ID;
                endDateValidator.ErrorMessage = "* EndDate is a required filed";
                endDateCell.Controls.Add(endDateValidator);
            }





Eric Skaggs
Top achievements
Rank 2
 answered on 19 Oct 2009
3 answers
145 views
I have 2 dropdown boxes populating data from another 2 tables data. It requires  "Please select…" & data entry validation before database values as the first value.

 I have done it like this.But I have to valiate it and ,If user select "Please Select ... " Option retun and show a message again please select a value to update value.

 


<
telerik:GridDropDownColumn DataField="CompanyID" DataSourceID="SqlDataSource2" EditFormColumnIndex="5" HeaderText="Company" ListTextField="CompanyName" ListValueField="CompanyID"  EnableEmptyListItem = "true" EmptyListItemText="--Please select Company--" EmptyListItemValue="0" UniqueName="CompanyID" ColumnEditorID="GridDropDownColumnEditor1">

 

 

 

</telerik:GridDropDownColumn>

 

 

 

 

 

 

Eric Skaggs
Top achievements
Rank 2
 answered on 19 Oct 2009
2 answers
189 views
Hi I am trying to changed the background color using CSS for the timepicker textbox.

If I use RadTimepicker.DateInput.BackColor = Color.Red; It works.

But if I use a css like RadTimepicker.DateInput.CssClass = "cssname"; it does not work. I have tried the css on other controls it does work so the css is fine.

Any thoughts on this.

Amendra
Suneco
Top achievements
Rank 2
 answered on 19 Oct 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?