Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
164 views
I am working on a project that will embed the RadEditor in a JQuery dialog. I have this working successfully in IE and Firefox, but not in Chrome, Safari, or Opera.

The issue seems to be a javascript error in the the Telerik script resource  files. Line 5404 has this:

var d=this._textIframe.contentWindow.document;

Chrome stops on this line and reports that the contentWindow is null. I dont have a javascript debugger for Safari or Opera, but I imagine it is the same issue there as well.

I've attached a screenshot that includes the javascript callstack.

 
Dobromir
Telerik team
 answered on 05 Feb 2010
1 answer
71 views
Hello I want to know if I can get he float location of the Dock panels to save on data base.
Pero
Telerik team
 answered on 05 Feb 2010
2 answers
107 views
Hi Team,

I have one not clearly problem using RagGrid ajax in my solution. I have one server side formed ragGrid that is working perferct outside my cms but inside is resfreshing only two times and no more resfreshing is made. In the fact the commands are working but  when i push over my radgrid selecting checkboxes or commands buttons one "Post" is generated everytime that i can see in firebug console and have a content but page is no more updated, EnableRowHoverStyle is no working anymore. Firebug and IEdev is not sending any errors for this page. I need some tips who to search this error or problem.Thanks, Romi

 <telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server">  
                            <AjaxSettings> 
                                <telerik:AjaxSetting AjaxControlID="PlanGrid">  
                                    <UpdatedControls> 
                                        <telerik:AjaxUpdatedControl ControlID="PlanGrid" /> 
                                    </UpdatedControls> 
                                </telerik:AjaxSetting> 
                            </AjaxSettings> 
                        </telerik:RadAjaxManager> 
                        <telerik:RadGrid ID="PlanGrid" EnableAJAX="True" EnableAJAXLoadingTemplate="True" runat="server" Skin="WebBlue"  GridLines="None" Width="100%" OnNeedDataSource="PlanGrid_NeedDataSource" 
                         OnItemCreated="PlanGrid_ItemCreated" OnUpdateCommand="PlanGrid_UpdateCommand"  AutoGenerateColumns="False" AllowMultiRowEdit="True" ShowStatusBar="true" AllowPaging="True">  
                             <MasterTableView DataKeyNames="Week" Width="100%" CommandItemDisplay="Top" EditMode="InPlace" PageSize="14">  
                                           <Columns> 
                                             <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">  
                                                    <HeaderTemplate> 
                                                     <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox> 
                                                    </HeaderTemplate> 
                                                    <ItemTemplate> 
                                                        <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> 
                                                    </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridBoundColumn UniqueName="Week" SortExpression="Week" HeaderText="Week" 
                                                DataField="Week" /> 
                                            <telerik:GridBoundColumn UniqueName="Price1"  HeaderText="Precio1" 
                                                DataField="PriceClp"/>                      
                                            <telerik:GridBoundColumn UniqueName="Price2"  HeaderText="Precio2" 
                                                DataField="PriceUs" /> 
                                              <telerik:GridBoundColumn UniqueName="Status"  HeaderText="Situación" 
                                                DataField="Status" />                       
                                            <telerik:GridEditCommandColumn UpdateText="Update" UniqueName="EditCommandColumn" 
                                                CancelText="Cancel" EditText="Edit">  
                                                <HeaderStyle Width="85px"></HeaderStyle> 
                                            </telerik:GridEditCommandColumn> 
                                        </Columns> 
                                        <CommandItemTemplate> 
                                               <asp:Label runat="server" ID="Label3">Cambia precio/situación sobre selectos o bien editar cada línea</asp:Label> 
                                               <br /> 
                                               <asp:Label runat="server" ID="lbPrice" Width="60">Precios</asp:Label> 
                                               
                                                 
                                               
                                                
                                               <br /> 
                                               <asp:Label runat="server" ID="Label1" Width="60">Situación</asp:Label> 
                                               <asp:DropDownList ID="ddlStatus" runat="server" Width="100" > 
                                                    <asp:ListItem Selected="True" Text="Situación" Value="-1"></asp:ListItem> 
                                                   
                                                      
                                                   
                                               </asp:DropDownList> 
                                               <asp:Button runat="server" ID="BtUpdateStatus" Text="Actualizar" CommandName="UpdateSit" Width="60" />   
                                         </CommandItemTemplate> 
                                         <EditFormSettings CaptionFormatString="Semana {0}" CaptionDataField="Week" > 
                                            <FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle> 
                                            <FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle> 
                                            <FormStyle Width="100%" BackColor="#eef2ea"></FormStyle> 
                                            <EditColumn ButtonType="ImageButton" /> 
                                        </EditFormSettings>   
                                        </MasterTableView> 
                            <ClientSettings EnableRowHoverStyle="true">  
                                <ClientEvents OnRowDblClick="RowDblClick"  /> 
                                <Selecting AllowRowSelect="True" /> 
                            </ClientSettings> 
                             <PagerStyle Mode="NumericPages"></PagerStyle> 
                        </telerik:RadGrid>     
Pierre
Top achievements
Rank 1
 answered on 05 Feb 2010
5 answers
388 views
Hi,
where can I found a sample of building edit form (popup) for grid in c# (server side) (no in html).

I have a question about popup edit form yet: is it possible to check datatype of data in column (e.g. datatype) and automatically in popup edit form show radtadepicker instead of textbox (all in server side code)?
Thanks.
Shinu
Top achievements
Rank 2
 answered on 05 Feb 2010
2 answers
377 views
How do i access controls serverside?

If i have
<telerik:radPanelItem text="test">
    <Items>
         <Telerik:radPanelItem>
                   <ItemTemplate>
                            <asp:button Id="Button1" runat="server" text="Button" />
                            <asp:textbox id="Textbox1" runat="server"></asp:TextBox>


If i fire the button in a button_click how do i get the value of textbox1 on the server??
lkj lkj
Top achievements
Rank 1
 answered on 05 Feb 2010
8 answers
176 views
Hi,

At the moment im swapping over an Ajax accordion to a RadPanel bar, however it doesnt create the user control when its inside the panelbar, but when its outside of it, it works fine, the user control is not ajax.

my code looks like this


    <telerik:RadPanelBar  
    ID="radAccordionSheepSales"  
    runat="server"  
    ExpandMode="SingleExpandedItem"
        <Items> 
            <telerik:RadPanelItem runat="server" Text="Sheep Sales"
            <ItemTemplate> 
                <table class="SheepSales_Table"
                    <tr> 
                        <td>                 
                            <uc1:ucSheepSales ID="ucSheepSales1" runat="server" />                 
                        </td> 
                        <td> 
                            <asp:LinkButton ID="btnAdd" runat="server" SkinID="SheepSales_BtnAdd">Add</asp:LinkButton> 
                        </td>     
                    </tr> 
                    <tr> 
                        <td> 
                            <div id="scrollDiv" class="SheepSales_Placeholder"
                                <asp:UpdatePanel ID="SheepSales_UpdateContainer" runat="server"
                                    <ContentTemplate> 
                                        <asp:PlaceHolder ID="phSheepSales" runat="server"></asp:PlaceHolder> 
                                    </ContentTemplate> 
                                </asp:UpdatePanel> 
                            </div> 
                        </td> 
                        <td> 
                        </td>     
                    </tr> 
                </table>             
            </ItemTemplate> 
            </telerik:RadPanelItem> 
             
            <telerik:RadPanelItem runat="server" Text="Sheep Kills"
            <ItemTemplate> 
                    <asp:PlaceHolder ID="phKills" runat="server"
                    <uc2:ucSheep ID="ucSheep1" runat="server" DisplayMode="Header" /> 
                    </asp:PlaceHolder>             
            </ItemTemplate> 
            </telerik:RadPanelItem> 
        </Items> 
    </telerik:RadPanelBar>   

Yana
Telerik team
 answered on 05 Feb 2010
3 answers
216 views
Hi,

I am binding radgrid from code behind using a dataset.

Grid1.DataSource= MyDataSet;
Grid1.DataBind();

Now, when i update/delete or inset a new record, i want to retrieve the updated DataSet back. What's the best way to do it?

I want something

Grid1_InsertCommand(....)
{
   DataSet MyNewDS= Grid1.GetUpdatedDataSet();
}

I want to do a batch update of DataSet in the database, not on every insert command.

Thanks.
Shinu
Top achievements
Rank 2
 answered on 05 Feb 2010
3 answers
61 views
Hello,
I am using the error handler example linked here:

http://www.telerik.com/help/aspnet/grid/grderrorhandling.html


The code runs fine, but it does not return a vaule for the field, it returns &nbsp rather than the key value. Correct values are displayed in the grid.

Any advice would be appreciated.




Princy
Top achievements
Rank 2
 answered on 05 Feb 2010
1 answer
344 views
What is the best practice you would suggest when filtering a fairly large data set (~400K records) in the grid? This is my current scenario:

1. I have a grid, a couple of search fields, and a search button. Standard paging is enabled in the grid.
2. The grid has a NeedDataSource event handler that runs a query against my database and then populates the grid with the results from the query. This query selects all records from the appropriate database tables. The DataSource property of the grid is set to this query.
3. The Click event handler of the search button checks if any of the search fields has text in it. If so, the FilterExpression of the grid is built with the proper criteria. If no search fields have any text, then the FilterExpression will remain empty and all records are returned. At the end, the Click event handler calls Rebind() on the grid, which in turn will call the NeedDataSource event handler.
4. The Page Index Changed event handler updates the current page index and calls Rebind() on the grid.

The filtering and paging work but it's rather slow (~20 seconds). Is this the correct approach for this problem? I'm worried that I'm getting all database records every single time and my application will be used in a low-bandwidth scenario. Or would it be better to change my query in the NeedDataSource event handler directly so that the grid DataSource property is only set to what is actually specified in the search criteria rather than use the FilterExpression?
Princy
Top achievements
Rank 2
 answered on 05 Feb 2010
1 answer
63 views
Hi,
    How do I add child rows to a hierachy grid, without allowing inserts to the Parent table. I have put Allowautotmaticinserts = "true"
in the properties and this Just seems to allow me to add a top level row, there is now "Add new Row" add the child level.

The html for the grid is as below
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True"  AllowMultiRowEdit="true" AllowPaging="True" AllowAutomaticUpdates="True"
    AllowSorting="True" GridLines="None" DataSourceID="sds_requests_by_status" AutoGenerateColumns="False"  AllowAutomaticInserts="true"
        AutoGenerateHierarchy="True" OnNeedDataSource="RadGrid1_NeedDataSource" Skin="WebBlue">
    <MasterTableView DataKeyNames="id"   DataSourceID="sds_requests_by_status" EditMode="InPlace">
        <DetailTables >
                    <telerik:GridTableView DataKeyNames="id" DataSourceID="sds_products_by_request" Width="100%" runat="server">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="id" MasterKeyField="id" />
                        </ParentTableRelation>
                        <Columns>
                             <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editcolumn">
                              <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn>
                                  <telerik:GridBoundColumn SortExpression="id" HeaderText="id"  ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="id" UniqueName="id" >
                            </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn SortExpression="session_id" HeaderText="session_id"  ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="session_id" UniqueName="session_id" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="product_code" HeaderText="product code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="product_code" UniqueName="product_code">
                            </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn SortExpression="description" HeaderText="description" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="description" UniqueName="description">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="supplier_code" HeaderText="Supplier code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="supplier_code" UniqueName="supplier_code">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="price" HeaderText="Price" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="price" UniqueName="price">
                            </telerik:GridBoundColumn>
                              <telerik:GridBoundColumn SortExpression="currency_code" HeaderText="Currency code" ReadOnly="true" HeaderButtonType="TextButton"
                                DataField="currency_code" UniqueName="currency_code">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="quantity" HeaderText="Unit quantity" ColumnEditorID="edit_quantity"  HeaderButtonType="TextButton"
                                DataField="quantity" UniqueName="quantity">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="" HeaderText="Product_price_id" ColumnEditorID="edit_product_price_id"  HeaderButtonType="TextButton"
                                DataField="Product_Price_Id" UniqueName="Product_Price_Id">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="" HeaderText="user_id"  ReadOnly="true"  HeaderButtonType="TextButton"
                                DataField="user_id" UniqueName="user_id">
                            </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn SortExpression="" HeaderText="user_identity"  ReadOnly="true"  HeaderButtonType="TextButton"
                                DataField="user_identity" UniqueName="user_identity">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </telerik:GridTableView>
          </DetailTables>            
        <Columns>
              <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="editcolumn">
                    <ItemStyle CssClass="MyImageButton" />
                </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="Request No." ReadOnly="True"
                SortExpression="id" UniqueName="id"  >
            </telerik:GridBoundColumn>
            
            <telerik:GridDropDownColumn FilterControlWidth="160px"   DataField="request_status" DataSourceID="sds_request_status"
            HeaderText="Request Status" ListTextField="Request_status" ListValueField="request_status"
            UniqueName="request_status" ColumnEditorID="GridDropDownColumnEditor1">
                        <FilterTemplate>
                            <telerik:RadComboBox ID="RadCbo_Request_status" DataSourceID="sds_request_status" DataTextField="request_status"
                                DataValueField="request_status" Height="200px" AppendDataBoundItems="true"
                                SelectedValue='<%#((GridItem)Container).OwnerTableView.GetColumn("request_status").CurrentFilterValue %>'

                                runat="server" OnClientSelectedIndexChanged="RequestStatusChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                </Items>
                                
                            </telerik:RadComboBox>
                            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                <script type="text/javascript">
                                    function RequestStatusChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("request_status", args.get_item().get_value(), "EqualTo");
                                    }
                                </script>
                            </telerik:RadScriptBlock>
                        
</FilterTemplate>
             <HeaderStyle Width="160px" />
        </telerik:GridDropDownColumn>
            
         <%--   
              <telerik:GridBoundColumn DataField="request_status" HeaderText="Status" SortExpression="request_status"
                UniqueName="request_status">
            </telerik:GridBoundColumn>--%>
              <telerik:GridBoundColumn DataField="request_date" DataType="System.DateTime" ReadOnly="true" HeaderText="Request Date" SortExpression="request_date"
                UniqueName="request_date">
            </telerik:GridBoundColumn>
               <telerik:GridBoundColumn DataField="price" DataType="System.Decimal" ReadOnly="true"  HeaderText="Value"
                SortExpression="price" UniqueName="price">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="first_name"  HeaderText="Submitter First Name" ReadOnly="true"
                SortExpression="first_name" UniqueName="first_name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="last_name"  HeaderText="Submitter Last Name" ReadOnly="true"
                SortExpression="last_name" UniqueName="last_name">
            </telerik:GridBoundColumn>
        </Columns>
         <ExpandCollapseColumn Visible="True">
            </ExpandCollapseColumn>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="True" />
    </ClientSettings>
</telerik:RadGrid>

Thanks
Robert Smith
Tsvetoslav
Telerik team
 answered on 05 Feb 2010
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?