Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
284 views

I am using a hyperlink column in a RadGrid.  The grid is bound via ClientBinding - binding is working fine.   Column is defined as follows:

 

<

 

telerik:GridHyperLinkColumn UniqueName="MLSNUMBER" HeaderText="Mls Number" DataNavigateUrlFields="DetailsUrl" DataTextField="MlsNumber" Target="_blank" DataNavigateUrlFormatString="{0}"></telerik:GridHyperLinkColumn>

 



The "DetailsUrl" field from the data source holds the complete target url as follows:
http://MyDomainName/ASP/RenderDetail.asp?printable=yes&PropertyID=8EFC370EC45847

When the hyperlink is clicked in the grid,  I get the following incorrect url:

http://localhost/website/http://webtest.realcomponline.com/ASP/RenderDetail.asp?printable=yes&PropertyID=8EFC370EC45847

Apparently my local root web server url is being prepended to the url coming from the datasource.

How can I stop this from happening?

Thx
seevo

dhuss
Top achievements
Rank 1
 answered on 10 Jun 2011
1 answer
171 views
I have a search page, which searches various sources (dynamically determined at runtime).

I would like to have a results area per source that updates as the search source completes. The setup that I have at the moment is not working.

Any help or advice will be greatly appreciated.

The trigger:
<telerik:RadTextBox ID="searchTerm" runat="server" SkinID="formText" CssClass="formField" />
  <telerik:RadButton AutoPostBack="false" ID="searchSubmit" UseSubmitBehavior="false" runat="server" Text="Search" OnClientClicked="search" />

The script:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function search() {
 
            var panelSourceMap = $.parseJSON($('#<%= textPanelSourceMap.ClientID %>').val());
            var query = $('#<%= searchTerm.ClientID %>').val();
 
            for (var i in panelSourceMap) {
                var panel = $find(panelSourceMap[i].Key);
                var sourceName = panelSourceMap[i].Value;
                if (panel != null) {               
                    panel.ajaxRequest(query);
                }
            }
        }
    </script>
</telerik:RadCodeBlock>

The markup:
<telerik:RadPanelBar ID="resultsPanelBar" runat="server"
    ExpandMode="FullExpandedItem" >
    <ItemTemplate>
        <h2>SomeText</h2>
        <telerik:RadAjaxPanel RequestQueueSize="10" LoadingPanelID="searchLoadingPanel" ID="resultsUpdatePanel" runat="server" Height="200px" Width="300px">           
            <selfsvc:SearchResults ID="searchResult" runat="server" />
        </telerik:RadAjaxPanel>
    </ItemTemplate>
</telerik:RadPanelBar>

The server code:
void resultsPanelBar_ItemDataBound(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
{
    string sourceName = ((KeyValuePair<string, string>)e.Item.DataItem).Key;
    RadAjaxPanel panel = (RadAjaxPanel)e.Item.FindControl("resultsUpdatePanel");
 
    if (panel != null)
    {
        selfService.UserControls.SearchResults results = (selfService.UserControls.SearchResults)panel.FindControl("searchResult");
 
        if(results != null)
            results.SourceName = sourceName;
 
        clientPnlSrcMap.Add(panel.ClientID, sourceName);
        panel.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(panel_AjaxRequest);
 
    }
}
Rob
Top achievements
Rank 1
 answered on 10 Jun 2011
1 answer
104 views
HI,

I am using RadAsyncUpload for file upload. Its working in IE 8, IE9. But its not working for firefox 4.0. This RadAsyncUpload control gets Open within RadWindow. Any help regarding this will be appreciated.

I am using telerik ASP.Net Ajax Version 2011.1.519.35. Shown code used for upload.
<body runat="server" style="background-color: White;">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="MasterScriptManager" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="AjaxManagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="AttachmentGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="AttachmentGrid" LoadingPanelID="RadAjaxLoadingPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            var $ = $telerik.$;
            var uploadsInProgress = 0;
 
            function onFileSelected(sender, args) {
                if (!uploadsInProgress) {
                   
                    $("#SaveButton").attr("disabled", "disabled");
                }
                uploadsInProgress++;
            }
 
            function onFileRemoved(sender, args) {
                document.getElementById("hiddenFileName").value = "";
            }
 
            function onFileUploaded(sender, args) {
                decrementUploadsInProgress();
                document.getElementById("hiddenFileName").value = args.get_fileName();
            }
 
            function onUploadFailed(sender, args) {
                decrementUploadsInProgress();
            }
 
            function decrementUploadsInProgress() {
                uploadsInProgress--;
 
                if (!uploadsInProgress)
                    $("#SaveButton").removeAttr("disabled");
            }
            
            function validationFailed(sender, eventArgs) {
                alert("File exceeds size Limit!");
                return false;
            }
 
            
        </script>
    </telerik:RadScriptBlock>
     
    <table width="98%" style="vertical-align: top" class="mainbody" border="0" >
        <tr id="trFileUpload" runat="server">
            <td valign="top">
                <fieldset id="FiledSet1" class="login">
                    <legend>Attachment</legend>
                    <table border="0">
                        <tr valign="top">
                            <td align="right" class="EditFormHeader" style="width: 18%">
                                File :
                            </td>
                            <td align="left" style="width: 82%">
                                <telerik:RadAsyncUpload runat="server" ID="AsyncFileUpload" Width="550px" EnableAjaxSkinRendering="false" EnableTheming="false"
                                    MaxFileInputsCount="1" MultipleFileSelection="Disabled" EnableInlineProgress="true"
                                    OnClientFileUploadFailed="onUploadFailed" OnClientFileSelected="onFileSelected"
                                    OnClientFileUploaded="onFileUploaded" OnFileUploaded="AsyncFileUpload_FileUploaded"
                                    OnClientFileUploadRemoved="onFileRemoved" MaxFileSize="10485760" OnClientValidationFailed="validationFailed" EnableFileInputSkinning="false" InputSize="50">
                                </telerik:RadAsyncUpload> File size limit 10 MB.
                                 
                            </td>
                        </tr>
                        <tr valign="top">
                            <td align="right" class="EditFormHeader" style="width: 18%">
                                Keywords :
                                <br />
                                (Enter one or more keyword describing document. Each keyword should be separated
                                by comma(,))
                            </td>
                            <td class="editFormRow" align="left" style="width: 82%">
                                <asp:TextBox ID="txtKeywords" runat="server" TextMode="MultiLine" Width="450px" Height="120px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td style="width: 18%">
                                  
                            </td>
                            <td align="left" style="width: 82%">
                                <asp:Button ID="btnUpload" runat="server" CssClass="actionButton" Text="Upload"  OnClick="btnUpload_Click"/> <asp:Button
                                    ID="btnCancel" runat="server" CssClass="actionButton" Text="Cancel" CausesValidation="false" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </td>
        </tr>
</table>
    <input id="hiddenFileName" type="hidden" name="hiddenFileName" value="" />
    <input id="hiddenIssueID" type="hidden" name="hiddenIssueID" value="" />
    <input id="hiddenActionID" type="hidden" name="hiddenActionID" value="" />
    <input id="hiddenOutcomeID" type="hidden" name="hiddenOutcomeID" value="" />
    </form>
</body>


Thanks,
Atman
Peter Filipov
Telerik team
 answered on 10 Jun 2011
1 answer
49 views
Hi All

I am probably missing somthing fundemental here,
However i am trying to put a Multi column rad combo into the edit template of a rad grid,
my problem is that the columns are rendering vertically and not horizontally (attached screen shot)?
How can i fix this please
<EditFormSettings EditFormType="Template">
                                            <FormTemplate>
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td align="left" width="30%">
                                                            <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small"
                                                                Text="Discount Type:"></asp:Label>
                                                        </td>
                                                        <td align="left" width="40%">
                                                            <telerik:RadComboBox ID="ZoneSTComboBox" runat="server" EnableLoadOnDemand="True"
                                                                DataTextField="portNme" OnItemsRequested="ZoneSTComboBox_ItemsRequested" DataValueField="st_tariff_zoneID"
                                                                AutoPostBack="true" HighlightTemplatedItems="true" Height="140px" Width="150px"
                                                                DropDownWidth="420px" Skin="Web20" NoWrap="true" OnClientSelectedIndexChanged="zoneSelectedIndex">
                                                                <HeaderTemplate>
                                                                    <ul>
                                                                        <li class="col1">Port</li>
                                                                        <li class="col2">Zone Description</li>
                                                                    </ul>
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <ul>
                                                                        <li class="col1">
                                                                            <%# DataBinder.Eval(Container, "Text")%>
                                                                        </li>
                                                                        <li class="col2">
                                                                            <%# DataBinder.Eval(Container, "Attributes['zone_descp']")%>
                                                                        </li>
                                                                    </ul>
                                                                </ItemTemplate>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                        <td colspan="3" width="30%">
                                                               
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" width="30%">
                                                            <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small"
                                                                Text="Discount Amount:"></asp:Label>
                                                        </td>
                                                        <td align="left" width="40%">
                                                            <telerik:RadComboBox ID="ZoneENComboBox1" runat="server" DataTextField="discountType"
                                                                DataValueField="discountTypeID" Skin="Web20" Width="150px">
                                                                <Items>
                                                                    <telerik:RadComboBoxItem runat="server" Text="--" Value="0" Selected="true" />
                                                                    <telerik:RadComboBoxItem runat="server" Text="Per Tug" Value="1" />
                                                                    <telerik:RadComboBoxItem runat="server" Text="Per Job" Value="2" />
                                                                </Items>
                                                            </telerik:RadComboBox>
                                                        </td>
                                                        <td colspan="3" width="30%">
                                                               
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" width="30%">
                                                               
                                                        </td>
                                                        <td align="left" width="40%">
                                                               
                                                        </td>
                                                        <td align="right" valign="middle" width="10%">
                                                        </td>
                                                        <td align="center" valign="middle" width="10%" style="width: 10%">
                                                            <telerik:RadButton ID="btnUpdate" CommandName='<%#  Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'
                                                                runat="server" Skin="Web20" Text='<%#  Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'>
                                                            </telerik:RadButton>
                                                        </td>
                                                        <td align="center" valign="middle" width="10%" style="width: 10%">
                                                            <telerik:RadButton ID="btnCancel" runat="server" Skin="Web20" CausesValidation="false"
                                                                CommandName="Cancel" Text="Cancel">
                                                            </telerik:RadButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </FormTemplate>
                                        </EditFormSettings>

Many Thanks

Regards

Cush
Cush
Top achievements
Rank 1
 answered on 10 Jun 2011
1 answer
103 views
I have a Website running v.2011_1_315 (Asp.Net Ajax). The editor's .Content and .Text properties are allways empty when running in IE9, but when using IE9 with Compatibility View turned on, everything seems fine. I upgraded the Telerik.WebUi,dll to v.2011_1_531, but the problem is still there. No content and no text unless running IE9 in Compatibility mode. But, the strangest is that on another website i have, running the exact same configuration and the same version of Telerik.Web.Ui.dll, I have no problems with IE9, and .Content and .Text has the values entered in the editor.

Am I missing something, or is there still some issues with IE9?

Roy
Rumen
Telerik team
 answered on 10 Jun 2011
1 answer
93 views
Hello ,
when using  download manager and press Export(Csv , Excel , PDF) it asks to download aspx file not exporting file .
any ideas ?
Mira
Telerik team
 answered on 10 Jun 2011
3 answers
103 views
Hi,

I am having a problem with HeaderStyle cssclass after the grid has been resized using "best fit" feature. To show the problem, please have a look on the colour of the header in Error.PNG. Ideally I want to have it look like it was before applying "best fit" shown as in "original.png".

Following is javascript is responsible for resizing the grid during page load event.

function pageLoad() {
            var grid = $find("<%= grid.ClientID %>");
            var columns = grid.get_masterTableView().get_columns();
            for (var i = 0; i < columns.length; i++) {
                columns[i].resizeToFit();
            }
        }

Many thanks.
MG
Galin
Telerik team
 answered on 10 Jun 2011
1 answer
142 views
I have implemented Filtering in my RadGrid, however, the filtering is done at the database, not by the Grid Control. Therefore I handle the Grid ItemCommand event, check for the Filter Command, build a filter string based on the filterPair, cancel the filter command and rebind the grid with the filterstring. Everything works fine except I have noticed a couple issues:

1) After the grid is rebound, if I click on the filtermenu icon, the "NoFilter" item is selected, even though the grid was filtered with some other selection (such as "StartsWith"). I assume this is because I set e.cancelled = true in the ItemCommand event. Is there a way to set the proper selected filter menu item after the grid is rebound? In the ItemCommand Event, I store the various column filter selections in viewstate, so I believe, If I am able to access the filter menu somehow, I should be able to set the right value (hopefully without firing another filter event)

2) When simple filtering is used and the user selects the "NoFilter" option to remove the filter, the text value they specified is cleared. This doesn't occur in my scenarion, and again I assume it is because I set e.cancelled = true in the ItemCommand event.. I tried adding the following to the ItemCommand Event handler:

Dim txtBox As TextBox = CType((CType(e.Item, GridFilteringItem))(filterPair.Second).Controls(0), TextBox)
                               If filterPair.First.ToString = "NoFilter" Then
                                   txtBox.Text = String.Empty
                               End If

What happens is, the filter value disappears for a moment, but then returns when the grid is finsihed rebinding. Is there a way to clear this text if the "NoFilter" option is selected?
Vasil
Telerik team
 answered on 10 Jun 2011
7 answers
139 views
Hi all,

I want to move the filter box to the header section, is it possible? Is yes please provide solution as soon as possible.


Thanks.
Iana Tsolova
Telerik team
 answered on 10 Jun 2011
4 answers
117 views
Hi all,

I have several grids which are automatically refreshing their data every 10 seconds via various methods (some radajax, some client binding via a web service call). The problem I'm running into is that if the user is in the middle of a column resize event (mouse is down and he's dragging a column), when the data refreshes, its creates an error state. In this case, the column resize image freezes along with the tool-tip and stays on the screen indefinitely until the page is reloaded.

So my question is this: is it possible to abort the current resize in progress type event prior to updating the grid data? ... or, alternatively, is it possible to capture the start of the resize so that I can stop my refresh timer? (OnResizing only fires on the client on mouseup of the resize).

Thanks in advance!
-Brian
Brian Azzi
Top achievements
Rank 2
 answered on 10 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?