Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
291 views

Client Side Rad Grid Binding- How to pass extra arguments to web service method (GetData or GetDataAndCount) other than 4 default arguments and bind grid on a button click with an asynchronous call to web service.

I am trying to use client side binding of Rad Grid as demonstrated on the following link http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx. My scenario is a bit different from this one. I want to pass in some 4-5 extra arguments to my web service method from the top level filter controls (not column level filter) on top of the page and then I want to rebind my grid by making an asynchronous call to my web service on a button click without a postback.

Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Nov 2012
4 answers
286 views
Hello,

I am using the RadAsyncUpload control to upload filesd to our website. Everything works fine except the drag and drop upload. I can manually add as many files as I want by clicking on the button, but I can only add one file trough drag and drop either trough the control itself or the drop zone. Any subsequent attempts to add a file by dropping it results in a "Uncaught TypeError: Cannot read property 'input' of undefined" in chrome or a "TypeError: p is undefined" in firebug. I tried playing with the AutoAddFileInputs parameter without success.

right now the tag looks like this :
<telerik:RadAsyncUpload runat="server" ID="rfUpload" Width="225px"
DropZones
="#DropZone" MultipleFileSelection="Automatic" AutoAddFileInputs="true"
               
OnClientAdded
="fiad" OnClientFileUploadRemoved="fiad" OnClientFileUploaded="fiup"
UploadedFilesRendering="BelowFileInput" />

and I can drag and drop several files at once but not one after the other.

I use Visual Studio 2012, RadControls Q3 2012, Windows 8 and .net framework 4.0 and we mainly use VB ( a C# solution would be fine since I'm fluent in both)
Atn
Top achievements
Rank 1
 answered on 02 Nov 2012
3 answers
142 views
My environment, (client -> HTTPS -> F5 -> HTTP -> web server)

I have a RadTabStrip and a RadGrid on a page, the initial page load seems to render the controls fine, but when I do a page refresh the rendering on the controls gets all skewed. 

And ideas?

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
        <ClientEvents OnRequestStart="onRequestStart" />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdItemComp">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItemComp" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItemComp" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" UpdatePanelRenderMode="Inline" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cbVendorsMain">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItemComp" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lblVendorItemsOnFile"  />
                    <telerik:AjaxUpdatedControl ControlID="cbVendors" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <div class="wrapper">
    <div class="IC_Header_Right">
        <p>Last Vendor Data Upload:
        <asp:Label runat="server" ID="lblLasVendorUpload" Text="" Font-Underline="true" /></p>       
        <b><asp:Label runat="server" ID="lblVendorItemsOnFile" Text="" /></b>
    </div>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
    </telerik:RadAjaxLoadingPanel>
 
    <div class="IC_TabStrip">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" ontabclick="RadTabStrip1_TabClick" EnableAjaxSkinRendering="true">
            <Tabs>
                <telerik:RadTab runat="server" Text="Matching" />
                <telerik:RadTab runat="server" Text="Discrepancies" Selected="True" />
                <telerik:RadTab runat="server" Text="Not in Our Item File" />
                <telerik:RadTab runat="server" Text="Not in Their File" />
            </Tabs>
        </telerik:RadTabStrip>   
 
        <div id="divgrid" class="IC_Grid">
            <telerik:RadGrid ID="grdItemComp" runat="server" Skin="Windows7" EnableAjaxSkinRendering="true"
                CellSpacing="0" GridLines="None" AutoGenerateColumns="False" AllowPaging="True"
                PageSize="17" onpageindexchanged="grdItemComp_PageIndexChanged"
                onneeddatasource="grdItemComp_NeedDataSource"
                onitemcommand="grdItemComp_ItemCommand" >
                <ClientSettings>
                    <Selecting CellSelectionMode="None"></Selecting>
                </ClientSettings>
                <ExportSettings HideStructureColumns="true" />
                <MasterTableView CommandItemDisplay="Bottom" UseAllDataFields="true">
                    <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" ShowExportToExcelButton="true"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="UPC" HeaderText="UPC" UniqueName="UPC">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SB_ITEM_NO" HeaderText="Our Item No" UniqueName="SB_ITEM_NO">
                            <HeaderStyle Width="50px" />
                            <ItemStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VENDOR_ITEM_DESC" HeaderText="Their Item Description" UniqueName="VENDOR_ITEM_DESC" DataFormatString="<nobr>{0}</nobr>">
                            <HeaderStyle Width="250px" />
                            <ItemStyle Width="250px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VENDOR_ITEM_SIZE" HeaderText="Their Item Size" UniqueName="VENDOR_ITEM_SIZE" DataFormatString="<nobr>{0}</nobr>">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SB_ITEM_DESC" HeaderText="Our Item Description" UniqueName="SB_ITEM_DESC" DataFormatString="<nobr>{0}</nobr>">
                            <HeaderStyle Width="250px" />
                            <ItemStyle Width="250px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SB_ITEM_SIZE" HeaderText="S.B. Item Size" UniqueName="SB_ITEM_SIZE" DataFormatString="<nobr>{0}</nobr>">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VENDOR_BASE_COST" HeaderText="Vendor Base Cost" UniqueName="Vendor_BASE_COST" DataFormatString="{0:###,##0.00###}"  >
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VENDOR_ALLOWANCE" HeaderText="Vendor Allowance" UniqueName="VENDOR_ALLOWANCE" DataFormatString="{0:###,##0.00###}">
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="VENDOR_NET_COST" HeaderText="Vendor Net Cost" UniqueName="VENDOR_NET_COST" DataFormatString="{0:###,##0.00###}">
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" BackColor="Silver" Font-Bold="True" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SB_BASE_COST" HeaderText="Our Base Cost" UniqueName="SB_BASE_COST" DataFormatString="{0:###,##0.00###}">
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>                       
                        <telerik:GridBoundColumn DataField="SB_ALLOWANCE" HeaderText="Our Allowance" UniqueName="SB_ALLOWANCE" DataFormatString="{0:###,##0.00###}">
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>                       
                        <telerik:GridBoundColumn DataField="SB_NET_COST" HeaderText="Our Net Cost" UniqueName="SB_NET_COST" DataFormatString="{0:###,##0.00###}">
                            <HeaderStyle Width="50px" HorizontalAlign="Right" />
                            <ItemStyle Width="50px" BackColor="Silver" Font-Bold="True" HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False"></FilterMenu>
            </telerik:RadGrid>
        </div>
    </div>    
 
    <script type="text/javascript">
 
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0) {
                args.set_enableAjax(false);
            }
        }
 
        function Popup(message) {
            alert(message);
        };
    </script>
    </div>
</asp:Content>

Maria Ilieva
Telerik team
 answered on 02 Nov 2012
2 answers
103 views
Good Day,

I have a small problem. The RadGrid I am working on is a Grid with NestedViewTemplates for each record. In the nestedTemplate there is another RadGrid. Now I use a recorded ID from the parent row to populate the RadGrid in the nested template. The Template loads up nicely but as soon as I collapse/expan the record to view the grid in the template receives a null value from the ID. Thus the data cannot bind. 

Is there a way to come around this? 

Thank you
Chris
Top achievements
Rank 1
 answered on 02 Nov 2012
13 answers
934 views
I have a rad grid that I'm exporting to excel. The column headers never show in the excel file. Any ideas why? Here's the code I use to export, 
RadGrid1.DataBind()
        RadGrid1.ExportSettings.OpenInNewWindow = True
        RadGrid1.ExportSettings.ExportOnlyData = False
        RadGrid1.ExportSettings.HideStructureColumns = False
        RadGrid1.ExportSettings.IgnorePaging = True
        RadGrid1.MasterTableView.ExportToExcel()
Kostadin
Telerik team
 answered on 02 Nov 2012
0 answers
178 views
Hi There,

When placing a RadTextBox inside a RadWindow, I get a JavaScript Error: TypeError: $telerik.$ is undefined

Placing a RadComboBox works without any problems.

This is my code:
<telerik:RadWindow ID="Details" runat="server" Title="Details" Width="450" Height="536"
 VisibleOnPageLoad="false" Behaviors="Move, Close" Left="580" EnableShadow="true" RegisterWithScriptManager="false">
    <ContentTemplate>
             <telerik:RadTextBox ID="Test" runat="server">
             </telerik:RadTextBox>
    </ContentTemplate>
</telerik:RadWindow>

Is this a know bug?

*UPDATE*

My bad, RegisterWithScriptManager="false" caused this behaviour.
JS
Top achievements
Rank 1
 asked on 02 Nov 2012
1 answer
93 views
Hi,
Thanks in advance for your help.
I have a rad grid connected to a SQL database, and also a button that pops up and allows user to add more items to the radgrid.
The data added from the seperate window is added into the radgrid and shows when I rebind it, so when I 'Import' the data from the pop up how do I rebind the radgrid in the parent window to display the data?
Many Thanks
Ryan

UPDATE: I now have it running how I need it to, however it is still not updating the screen without refreshing it, How do I add the Ajax controls?

The code it runs through currently
function refreshRadGrid() {
    var masterTable = $find("<%=RadGrid2.ClientID%>").get_masterTableView();
    masterTable.rebind();
}
 then
Protected Sub RadGrid2_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid2.NeedDataSource
    ' MATERIALS FOR DAYSHEET
    Dim dt As New DataTable
    If lblHeaderID.Text <> 0 Then
        Dim itm As New dbrcOrdItems(Session("ConnectionString"))
        Dim HeaderID As Integer = lblHeaderID.Text
        dt = itm.ListforDaySheet(HeaderID)
        RadGrid2.DataSource = dt
    End If
    RadGrid2.DataSource = dt
End Sub

Thanks once again
Eyup
Telerik team
 answered on 02 Nov 2012
1 answer
149 views
Why is does the RadGrid disappear when I click on or drag the Radwindow? Is there a way to eliminate this behavior?
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="false" Width="638px" Height="323px" Top="80px" Left="80px" VisibleStatusbar="False" BorderStyle="None" BorderWidth="1px"
        InitialBehaviors="Close, Move" Animation="None" Behaviors="Close, Move" EnableViewState="false"  InitialBehavior="Close">
        </telerik:RadWindowManager>

//Show RadWindow with
function ShowWindow(Document) {
    //Popup Window
    top.radopen(Document, "RadWindow1");
    //Window within the Iframe
    //window.radopen(Document, "RadWindow1");
    return false;
}


Marin Bratanov
Telerik team
 answered on 02 Nov 2012
1 answer
310 views
in the screen shot attached, how do I get rid of the top border which appears on tabs in the sitefinity skin when in vertical orientation. Also, how do I get rid of the border which is show along the bottom of the tabstrip?
Princy
Top achievements
Rank 2
 answered on 02 Nov 2012
2 answers
150 views
Preface:
In my application, we use a lightbox to open the RADEditor. Its position in the page (vertical height) will be relative on the page to where it was clicked.

Problem:
When the RadEditor is opened further down on the page, all the additional pop-ups that are generated by the RADEditor appear in random locations (not director over the RADeditor). For example, if I try to paste-in plain text, open the image/document Library, Table Wizard, or any other pop-up, they will be way above, or way below the immediate RadEditor. How can I control the placement of these pop-ups?

(example below shows a "moderate" version where the Past Plain Text window first loads)

Rumen
Telerik team
 answered on 02 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?