Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
219 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
141 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
220 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
137 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
182 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
1 answer
143 views
Hi all,

I've set up a hosting account with a provider and FTP'd all my folders up and the site is up and running however the radmenu,radcombo boxes etc arent working. What I mean by this is the radmenu isn't expanding and the drop downs arent dropping down.

I've made sure the Telerik dll is in the bin folder but its not working.

Can anyone point out anything I might need to add to the deployment or change on the hosting account?

Thanks,

Phil
Paul
Telerik team
 answered on 19 Oct 2009
3 answers
78 views
The RadUpload control does not show when using 1014 hot fix, had to revert to earlier version to get it working again.
Paul
Telerik team
 answered on 19 Oct 2009
2 answers
271 views
Migrating from .Net1.1 to .Net2.0 using Radgrid Q3 2008
I got 50 columns and all of which has its defined width.
showing and hiding of columns are dynamic.

with the previous version if I set the radgrid to width to 100% it will occupy entire page no matter what the resolution is, the grid will have its horizontal scrollbar to show 50 or less columns based on data with no problem..

Now if I set the Radgrid width to 100% with 2.0 Radgrid Q3 2008, radgrid will not have the horizontal scrollbar but instead the whole page will have it.. Grrrrrrrrr
I also put this to a panel, div etc but to no avail.. I cant control the width of the grid.. Using pixel width works but I dont want to use it for I want to get most of the space based on clients resolution. like for instance if I set the width to 1024px and if its viewed with higher resolution, it will have this huge empty space which doesnt look good. I wanted to maximize the space as much as possible.. 

Any inputs for this..

thanks in advance..


Some radgrid codes

<

 

rad:radgrid id="RadGrid" runat="server" RadControlsDir="~/RadControls/"

 

 

Height="200px" AllowMultiRowSelection="True" ForeColor="White" AllowMultiRowEdit="True" Skin="Classic"

 

 

ItemStyle-BackColor="WhiteSmoke" AlternatingItemStyle-BackColor="White" BorderStyle="None" GridLines="Both" SkinsPath="~/RadControls/Grid/Skins">

 

 

<AlternatingItemStyle Font-Size="Small" Font-Names="Arial Narrow" HorizontalAlign="Left" VerticalAlign="Middle" BorderStyle="None" CssClass="AlternatingItemRow" BackColor="White"></AlternatingItemStyle>

.....
.....

 

<

 

ClientSettings>

 

 

 

 

 

<Selecting AllowRowSelect="True" EnableDragToSelectRows="False"></Selecting>

 

 

 

 

 

<Resizing ResizeGridOnColumnResize="True" AllowColumnResize="True"></Resizing>

 

 

 

 

 

<ClientEvents OnRowDeselected="RowDeselected" OnRowSelected="RowSelected" OnRowCreated="RowCreated"></ClientEvents>

 

 

 

 

 

<Scrolling ScrollHeight="202px" AllowScroll="True" UseStaticHeaders="True"></Scrolling>

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

</rad:radgrid>

 

Pavlina
Telerik team
 answered on 19 Oct 2009
2 answers
339 views
Hello Telerik team,

I am having a RadEditor, in which i am trying to create an html template. I have fixed the width of the template. We have got Image Manager to insert image in our template.

So, when we use image manager to upload an image from my system, If image width is more than the html template width, I want the image width & height should be adjusted in proportion with the width of the template . Also a border with border-width =3 & border color= red is to be set. Also the allignment of the image should be center allign.

I want these as the default settings for most of the images i want to have in my template.

I dont want to use the properties window of Image manager to set these properties, as i want the above specifications with every image i want to insert.

 Please help me out with the possible solution for my problem. 

I have looked for the properties of image manager but found nothing helpful.

Kindly help me out with the issue.

Thanks,
Chinmay Sharma.
Nick Smith
Top achievements
Rank 1
 answered on 19 Oct 2009
1 answer
169 views
Hi,

I have 2 RadAjaxPanels. One has a button on it and the second has a RadGrid.
Both have enableAJAX set to true and the panel with RadGrid has the LoadingPanelID set.

Using the OnAjaxSettingCreating event of the RadGrid panel i add a AsyncPostbackTrigger to the e.UpdatePanel.Triggers collection.
The ControlID of the AsyncPostbackTrigger is set to the button of the first panel.

When i click the button (RadGrid.Rebind() is callled) both panels get updated now and this is what i needed.
However when the button is clicked the LoadPanel doesn't appear. Only when a Control of the radGrid panel triggers a call it get's triggered.

Is there something else i need to set to have the LoadingPanel appear when an update is coming from a control not on the RadAjaxPanel?
Pavlina
Telerik team
 answered on 19 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?