Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
106 views
Hi,

I am trying to display header text in two lines. The first line will have the code and the second line will be description. In order to force the description in second row, I inserted <br> tag between code and description. so my headertext would be something like "MSFT<br>Microsoft". The header text is displayed correctly in the grid. But it breaks when I try to export the grid to pdf. I read in the documentation that we cannot have "<", ">" or any other invalid XHTMl tags. so my question is how can I display the header text in two lines and still be able to export to pdf? Is there any other valid xhtml tag that I can use?

Thanks,
sridhar.
Daniel
Telerik team
 answered on 22 May 2013
13 answers
4.2K+ views
All,

I have a delete button inside a RadAjaxPanel:

<asp:Button id="btnDelete" Text="Delete" OnClientClick="return confirm('Are you sure you want delete this?');" runat="server"/>

The js popup is working, but it is not running the server-side click event attached to button.  Take away the OnClientClick, the server-side event runs fine.

What am I doing wrong?

Cheers,
Dave
Elias
Top achievements
Rank 2
 answered on 22 May 2013
10 answers
608 views
Hello

I've the following Grid Template Column

<telerik:GridTemplateColumn UniqueName="TemplateColumn">
<ItemTemplate>
      <div class="divPopularGridTags">
         <%# Convert.ToString(Eval("Tags"))%>
      </div>
</ItemTemplate>
</telerik:GridTemplateColumn>

In the tags datafield i may get a single tag or multiple tags (separated by spaces). Eg. sports, sports cricket, sports cricket sachin etc.

For each tag i need to create a link button which when clicked will take it to a different page. How can i dynamically do that?

I've trapped GridCreated client side event of RadGrid and i've written the following JQuery function to dynamically build the controls.

function RadGridPopular_GridCreated(sender, args)
{
    $(".divPopularGridTags").each(function()
    {
        var tagsText = $(this)[0].innerText;
        var tags = tagsText.split(' ');
        var innerContent = '';
         
        if(tags.length > 2)
        {
            $.each(tags, function(){
                //generate random number to set it to ID
                var randomNum = Math.floor(Math.random()*2);
                var ranNumberString = randomNum + '';
                innerContent = innerContent + "<asp:LinkButton CommandName='tagPopular" + $(this) +"' ToolTip='Tag' runat='server' ID='aspLinkPopularBookmarkTag' CssClass='popularbookmarkTag' onmouseover='popBookmarkTagMouseOver(this)' onmouseout='popBookmarkTagMouseOut(this)'/> ";                       
            });
        }
        else
        {
            innerContent = innerContent + "<a href='#'>" + tags[0]+ "</a>"; 
        }
         
        this.innerText = '';
        this.innerHTML = innerContent;
    });
     
}

But i get the following error

Control 'aspLinkPopularBookmarkTag' of type 'LinkButton' must be placed inside a form tag with runat=server.   at System.Web.UI.Page.VerifyRenderingInServerForm(Control control)
   at System.Web.UI.WebControls.LinkButton.AddAttributesToRender(HtmlTextWriter writer)

Any ideas how can i achieve this?

Regards
Raghavendra
Harry
Top achievements
Rank 1
 answered on 22 May 2013
3 answers
182 views
Can anyone suggest a way of scrubbing the comments content created by rad editor without loading the content in Rad Editor and using the built-in Remove All toolbar button? Ideally this would be done server-side on some piece of content.
Elliott
Top achievements
Rank 2
 answered on 22 May 2013
2 answers
120 views
What I'm wondering is if the upload is interrupted by some other occurence, such as the browser crashing when the user is 3/4 the way done, can it be resumed if the user reconnects and tries to upload the file again? My reading of the pause/resume feature seems like it is tied to that instance of the AsyncUpload and so would not be resumable in this scenario; the user would start anew each time. Correct?
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 22 May 2013
2 answers
80 views
Just trying to verify how the upload actually occurs. Our website is using https, so if that's how the user is connected, does the upload also occur over https ?
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 22 May 2013
3 answers
277 views
Hello,

     I am trying to dynamically hide a button that is contained in a nested view contained in each row on a telerik grid.

The grid represents a series of transactions, each with a transaction date. Upon expanding a row on the grid the button should be hidden for that particular row if the transaction date for that row is older than today. If the transaction date for that record is = today, then the button should appear,

I have tried the ItemCommand method, checking for ExpandCollapse event

if (e.CommandName == RadGrid.ExpandCollapseCommandName && !e.Item.Expanded)
 
This gets me the event that is firing for row expand. At this point, however, my data is not bound to the nested view for that row on the grid so I can't involve logic to hide based on a date for this particular row.

I will note that I am setting a series of labels on the nested view for the row - and the transaction date is one of the values. I tried accessing that label's text for my date logic but it is not set at the time of the "Expand" in itemCommand. If I expand, collapse, and expand again the data is there - so there is a timing issue with my data in using itemCommand.

In general which event is preferred to access controls in a Nested View and what methods could I employ to get at the data associated with the nested view? Would a client side approach be easier? 

Nested view settings:
<NestedViewSettings DataSourceID="SqlDataSourceInnerTable">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="TRAN_ID" MasterKeyField="TRAN_ID" />
                </ParentTableRelation>
 </NestedViewSettings>

Datasource:
<asp:SqlDataSource ID="SqlDataSourceInnerTable"
ConnectionString="<%$ ConnectionStrings:LAWConnectionString %>"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM TRANS_HIST AS TH INNER JOIN
                         TRANS_TYPE AS TT ON TH.TRANS_TYPE_ID = TT.TRANS_TYPE_ID INNER JOIN
                         TRANS_STATUS ON TH.STATUS_ID = TRANS_STATUS.STATUS_ID LEFT OUTER JOIN
                         TRANS_SUBTYPE ON TH.TRANS_SUBTYPE_ID = TRANS_SUBTYPE.TRANS_SUBTYPE_ID
         WHERE (TH.TRAN_ID = @TRAN_ID)"
runat="server">
        <SelectParameters>

Ulonda
Top achievements
Rank 1
 answered on 22 May 2013
9 answers
310 views

I have two web front end servers configured with Load Balancer and one application server outside the load balancer configuration , and although I configured the machine key on both servers in the web config with the same values as you see in the below:

<machineKey validationKey="AEDAB4B755EB987CBBB4C56EA861BD8A6D2DF4425A9FB7F8" decryptionKey="96A44D2D02FEBBEF8E1FC94DBE4820AC67AEB8BA95DB9C53" validation="SHA1" />

WebResources references are different as you see in the below:

Web front end 1

<link href="/WebResource.axd?d=EUJeeKSuEHqtpWqYXKVDjXJwZS7qQrsjgWJPMkRyIcYidNaMCqJlrJfAZm184B8RJVb1d3QvRziOvCOXxIbf3b-svaG69jUCbEVxwomMUDQ_oerenUHELlXDkKGilSlk0&amp;t=634183493748290221" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

Web front end 2

<link href="/WebResource.axd?d=TFV8V9QizTHQudTQT7Dl7QlzBUw0G7zm7h08wDFQ_UzipCD3e-UfPbUM_K99qXB2tXDFm-IsNhtDmJRjcry3StO61iot2FcGK7_7XrsDCngKWEvSyBafv6D598hVEKY0LXNXFO8k-WFPbcklJ7FhAo0nSvrBXMyffRQN283jgYoatDQV0&amp;t=634509229928059050" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

 

Application server

<link href="/WebResource.axd?d=EUJeeKSuEHqtpWqYXKVDjXJwZS7qQrsjgWJPMkRyIcYidNaMCqJlrJfAZm184B8RJVb1d3QvRziOvCOXxIbf3b-svaG69jUCbEVxwomMUDQ_oerenUHELlXDkKGilSlk0&amp;t=634183493748290221" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />

So I need to know why in the web front end 2 the web resources url refrences is different because it produce errors when redirect from one server to the other.

Peter Filipov
Telerik team
 answered on 22 May 2013
1 answer
56 views
Hi,

Setting OnReordered="true" is causing postback even when no reordering of the tabs is done.  It's causing postback when clicking on tabs to select which is not desired.  Is there anyway to workaround?

Thanks,
Kern.
Nencho
Telerik team
 answered on 22 May 2013
10 answers
933 views
I recently upgrade to the newest version of telerik and now all of the width attributes in my radtextbox's are not working. Essentially setting all of my textboxes at a default ~150px. I am using a custom theme. Can anyone suggest a fix. 

I found this after posting - http://www.telerik.com/community/forums/aspnet-ajax/input/radtextbox-width-not-working-after-upgrade.aspx


downgrading does not seem to help 
Galin
Telerik team
 answered on 22 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?