Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
Datasource to my grid is a colleciton of Object. which has child objects. How do I bound the col to Chidobject Property?
Martin
Telerik team
 answered on 11 Aug 2010
5 answers
364 views
Hi,

i have install the latest telerik asp.net ajax radcontrol. the previous version 2009 which i implement was working fine with respect to Grid Column Width, i.e the width of the column was getting resized as per column data, however with 2010 Q1 version now all the grids column has got the equal or same size.

kindly help me on this.

Dimo
Telerik team
 answered on 11 Aug 2010
7 answers
236 views

I get "Error loading RadChart image." error when i browse a page that has chart control in it. This is trial version and i am middle of evaluating the product on widows xp. I search through forum here but that did not solve my issue because i do not have session tag in web.confg. I gave aspnet user full control on site to see if this is a permission issue.
Version: 2008.2 723 Released:7/23/2008

Here is sample code:

<

telerik:RadChart ID="radChartByModelCode" Width="900px" Height="500px" Skin="Web20" runat="server"></telerik:RadChart>

I also tried setting UserSession="false" but same error.

Kannadasan
Top achievements
Rank 1
 answered on 11 Aug 2010
1 answer
183 views
Anybody come across this behavior? I have implemented a RadGrid inside a RadAjaxPanel. I have enabled sorting and paging and everything works fine. I was surprized to find very few examples of how to get the PageSize combobox to work with paging and sorting, even though it is in almost every RadGrdi demo one the Telerik site. Anyway, after a lot of digging, I found an incomplete example which I implemented as follows in my code-behind:

Protected

 

Sub PageSizeChanged(ByVal sender As Object, ByVal e As GridPageSizeChangedEventArgs) Handles _  
                                                                    RadGrid1.PageSizeChanged

 

 

   RadGrid1.DataSource = myDataSource

 

   RadGrid1.PageSize = e.NewPageSize

 

   RadGrid1.DataBind()

 

End

 

Sub

The problem is that this event does not only fire when I change the page size by changing the selection in the page zie combobox in the footer of the grid, but it fires approximately every 3 seconds, even when I am on a different page in my project. It is almost like the page refreshes every few seconds. And it keeps doing it. When I am on my grid page and I change the page size, my grid never actually finishes loading--my RadAjaxLoadingPanel just keeps spinning indefinitely.

 

Pavel
Telerik team
 answered on 11 Aug 2010
1 answer
126 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
187 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
142 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
91 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
177 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?