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

I have a weird error... I have a bunch of TextBox's and a RadGrid which is ajaxified with auto updates enabled. These TextBox's, and the TextBox's in the editable template in the RadGrid use a RadInputManager.

<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" LoadingPanelID="AjaxLoadingPanel">
<telerik:RadGrid ID="rgPriceLists" runat="server" Width="600px" Skin="Default" AutoGenerateColumns="false" DataSourceID="objPriceLists"">
    <MasterTableView EnableNoRecordsTemplate="false" Width="100%" DataKeyNames="PriceListId" AllowAutomaticUpdates="true" EditMode="InPlace">
        <Columns>
            <telerik:GridBoundColumn HeaderText="Name" DataField="Name" ReadOnly="true" />
            <telerik:GridBoundColumn HeaderText="Pub" DataField="Pub" ReadOnly="true" />
            <telerik:GridTemplateColumn HeaderText="Price">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%# GetCulturedPriceOrBlank(Eval("Price") == null ? 0 : (decimal)Eval("Price"), 0.0m, (string)Eval("Pub")) %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="tbPrice" runat="server" Text='<%# Bind("Price") %>' Columns="7" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Tax">
                <ItemTemplate>
                    <asp:Label ID="lblTax" runat="server" Text='<%# GetCulturedPriceOrBlank(Eval("Tax") == null ? 0 : (decimal)Eval("Tax"), 0.0m, (string)Eval("Pub")) %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="tbTax" runat="server" Text='<%# Bind("Tax") %>' Columns="7" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Active?">
                <ItemTemplate>
                    <asp:CheckBox ID="cbIsActive" runat="server" Checked='<%# Eval("IsActive") ?? false %>' Enabled="false" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:CheckBox ID="cbIsActive" runat="server" Checked='<%# Bind("IsActive") %>' />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridEditCommandColumn ItemStyle-Width="40" ItemStyle-HorizontalAlign="Right" ButtonType="ImageButton" UniqueName="EditCommandColumn" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>

<telerik:RadInputManager ID="RadInputManager1" runat="server">
    <telerik:TextBoxSetting BehaviorID="TextBoxBehavior1">
        <Validation IsRequired="true" ValidationGroup="ValidatePage" />
        <TargetControls>
            <telerik:TargetInput ControlID="tbProductName" />
        </TargetControls>
    </telerik:TextBoxSetting>
    <%--<telerik:TextBoxSetting BehaviorID="TextBoxBehavior2">
        <Validation IsRequired="false" />
        <TargetControls>
            <telerik:TargetInput ControlID="tbProductSpecialDescriptionDisplay" />
            <telerik:TargetInput ControlID="tbFuturePayDesc" />
            <telerik:TargetInput ControlID="tbProductShortName" />
            <telerik:TargetInput ControlID="tbPromoCode" />
        </TargetControls>
    </telerik:TextBoxSetting>--%>
    <telerik:NumericTextBoxSetting BehaviorID="NumericTextBoxSetting1" Type="Currency">
        <Validation IsRequired="true" ValidationGroup="ValidatePage" />
        <TargetControls>
            <telerik:TargetInput ControlID="tbProductPriceExTax" />
            <telerik:TargetInput ControlID="tbProductPriceTax" />
        </TargetControls>
    </telerik:NumericTextBoxSetting>
    <%--<telerik:NumericTextBoxSetting BehaviorID="NumericTextBoxSetting2" Type="Number" DecimalDigits="0" AllowRounding="False" GroupSeparator="">
        <Validation IsRequired="true" ValidationGroup="ValidatePage" />
        <TargetControls>
            <telerik:TargetInput ControlID="tbProductDurationDays" />
            <telerik:TargetInput ControlID="tbProdIdUpgradeTo" />
            <telerik:TargetInput ControlID="tbProdIdUpgradeFrom" />
            <telerik:TargetInput ControlID="tbProdIdDiscountedForDefaultProduct" />
            <telerik:TargetInput ControlID="tbRenewsInto" />
        </TargetControls>
    </telerik:NumericTextBoxSetting>--%>
    <telerik:NumericTextBoxSetting BehaviorID="NumericTextBoxSetting3" Type="Currency">
        <Validation IsRequired="false" />
        <TargetControls>
            <telerik:TargetInput ControlID="tbPrice" />
            <telerik:TargetInput ControlID="tbTax" />
        </TargetControls>
    </telerik:NumericTextBoxSetting>
</telerik:RadInputManager>

As you can see, I have 2 blocks in the RadInputManager commented out. The RadGrid correctly Ajaxifies the edit/update commands when these blocks are commented out. However when i uncomment out 1 of those RadInputManager blocks, I get a javascript error on the initial edit "a is null" in Telerik.Web.UI.WebResource.axd

Why?? :(

Michael
Top achievements
Rank 1
 answered on 11 Aug 2010
1 answer
188 views
I am trying to follow http://www.telerik.com/help/aspnet-ajax/grid-live-data-from-web-service.html and do something similar. Although when I try to access the MasterTableView it comes back as null. What am I missing???

<head runat="server">
    <title></title>
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
       <script type="text/javascript">
            //<![CDATA[
           function pageLoad(sender, args) {
               SearchServices.GetSearches(updateGrid);
           }
           function updateGrid(result) {
               //alert(result[0].OriginCity);
               var tableView = $find("<%= gridResults.ClientID %>").get_masterTableView();
               tableView.set_dataSource(result);
               tableView.dataBind();
           }
           //]]>
       </script>
   </telerik:RadCodeBlock>
</head>
<body>
    <form runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server" EnablePageMethods="true">
            <Services>
                <asp:ServiceReference  Path="SearchServices.svc" />
            </Services>
        </telerik:RadScriptManager>
         
        <telerik:RadGrid ID="gridResults" runat="server">
            <MasterTableView
                Name="Main"
                AutoGenerateColumns="false"
                Width="100%">
                <Columns>
                    <telerik:GridBoundColumn HeaderText="ID" DataField="ID" />
                    <telerik:GridBoundColumn HeaderText="City" DataField="OriginCity" />
                    <telerik:GridBoundColumn HeaderText="State" DataField="OriginState" />
                </Columns>
            </MasterTableView>
    </telerik:RadGrid>
    </form>
Pavel
Telerik team
 answered on 11 Aug 2010
1 answer
156 views
Hello Sir,

I am using Inline Insert and Edit in RadGrid.

But When I insert and Edit Record Save Button is not in Grid and Record affected on that Button.

So Please Give Me Proper Solution.

Attached Screenshot For That.

Thanks.

Kishor Dalwadi
Shinu
Top achievements
Rank 2
 answered on 11 Aug 2010
0 answers
97 views

Hi,

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Please reply

santhosh

santhosh
Top achievements
Rank 1
 asked on 11 Aug 2010
1 answer
185 views
I like the look of the default commanditem, and have set <CommandItemSettings ShowExportToExcelButton="true".

However, I like to control the exporting to excel myself.

I was thinking to write my own exporting code in the grid.ItemCommand:

    Select Case e.CommandName
      Case "ExportToExcel"
       [Export to Excel code]

However, the built in exporting still fires.
Daniel
Telerik team
 answered on 10 Aug 2010
0 answers
103 views

So there’s an apparent bug in Exchange Web Services (Exchange 2007) that screws up the display of recurring calendar events when we use EWS. Basically, the returned XML contains DateTimes for recurring events that are provided in 2 different time zones: local time and zulu time, making events at certain times of the day disappear.

It’s noted in the Microsoft Press book “Inside Microsoft Exchange Server 2007 Web Services” (http://www.microsoft.com/learning/en/us/book.aspx?ID=10724&locale=en-us ). Excerpt attached.

The book recommends that we wait until Service Pack 1… however we have just installed SP3 and the issue remains. It *looks* like the Telerik Exchange provider is trying to work around it in ExchangeSchedulerProvider.cs with the following method:

public RecurrenceRange ConvertToRecurrenceRange2(EndDateRecurrenceRangeType endDateRecurr)
        {
            RecurrenceRange range = new RecurrenceRange();
            range.Start = endDateRecurr.StartDate;
            range.RecursUntil = endDateRecurr.EndDate.Date.AddDays(1);
 
            return range;
        }

Has anyone dealt with this and, if so, how?

Thanks in advance

Jonathan

Jonathan
Top achievements
Rank 2
 asked on 10 Aug 2010
0 answers
57 views
Please disregard  this post.
RageMonkeyRage
Top achievements
Rank 1
 asked on 10 Aug 2010
1 answer
110 views
I have a templated combo showing Product Title, System, and Cost.

<
telerik:RadComboBox ID="radcmbProduct" runat="server" Width="400px" Height="200px" AllowCustomText="false" EmptyMessage="Select a Product" EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" HighlightTemplatedItems="true" MarkFirstMatch="true" NoWrap="true" OnItemsRequested="radcmbProduct_ItemsRequested" OnItemDataBound="radcmbProduct_ItemDataBound">
   <HeaderTemplate>
         <ul>
            <li class="col1">Title</li>
            <li class="col2">System</li>
            <li class="col3">Price</li>
         </ul>
   </HeaderTemplate>
   <ItemTemplate>
         <ul>
            <li class="col1">
               <%# DataBinder.Eval(Container.DataItem, "Title") %></li>
            <li class="col2">
               <%# DataBinder.Eval(Container.DataItem, "GameSystemName") %></li>
            <li class="col3">
               <%# DataBinder.Eval(Container.DataItem, "Cost") %></li>
         </ul>
   </ItemTemplate>
</telerik:RadComboBox>

The Product Title is going to be longer than I can fit ,  I have tried turning NoWrap off and Cost end up on the next line but I am having enough issues with the highlighting that I turned it back on.  Here is the CSS:

.col1

 

, .col2, .col3

 

{

 

float: left;

 

 

width: 100px;

 

 

margin: 0;

 

 

padding: 0 5px 0 0;

 

 

line-height: 14px;

 

}


I want to get the highlighting and perhaps the text wrapping to work together so it looks good.  Here is what it looks like now (see attachment)

I am not sure what is missing but it will not highlight based on the template and even if I turn nowrap on as it is, the highlight line is way above where the mouse is, etc.
Jeff Reinhardt
Top achievements
Rank 1
 answered on 10 Aug 2010
1 answer
143 views
I am trying to figure out in code-behind how to delete RadDock1 from a RadDockZone/RadDockLayout if I click on a button.  And how do I programatically add a RadDock by clicking on a button?
Petio Petkov
Telerik team
 answered on 10 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?