Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
79 views
How to change the direction of item placement in a multi-column combobox?

Let's say I have these items:

A, B, C, D, E, F, G, H, I

With default settings, items are place like this:

A  B  C
D  E  F
G  H  I    

How I want to place them is:

A  D  G
B  E  H
C  F  I

Thanks
Ned
Top achievements
Rank 1
 answered on 29 Oct 2014
1 answer
86 views
Hi, Can anyone tell me if either RadDropDownList or RadComboBox allows you to define a template for the selected item? I see that RadComboBox in the silverlight suite has a SelectionBoxTemplate option... that's essentially what I'd like to have for a dropdown in asp.net ajax - the ability to view the details of the selected item in the DropDownList without having to open the list to see the templated list items that have the details. 

Thanks in advance!
Nencho
Telerik team
 answered on 29 Oct 2014
2 answers
119 views
Greetings,

After upgrading Telerik version to '2014.2.724.35', I am facing issue with the 'RadComboBox'. The checkbox is displayed in one row and text in another row.

Thanks,
Aman
Aneliya Petkova
Telerik team
 answered on 29 Oct 2014
1 answer
142 views
I add Style Sheet in page design:

<style type="text/css">
     
        .RadGrid td .ajax__calendar td
        {
            padding: 0;
        }
</style>

And Use the Radgrid Control as following Code:
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
<telerik:RadGrid ID="gvTabularFormat" runat="server" AutoGenerateColumns="False"
                                                                Skin="Windows7" Width="720px" AllowPaging="false" ShowHeader="true" ShowFooter="true"
                                                                AllowSorting="false" OnItemDataBound="gvTabularFormat_OnItemDataBound">
                                                                <ClientSettings>
                                                                    <Scrolling FrozenColumnsCount="0" AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true">
                                                                    </Scrolling>
                                                                </ClientSettings>
                                                                <MasterTableView TableLayout="Auto">
                                                                    <NoRecordsTemplate>
                                                                        <div style="font-weight: bold; color: Red;">
                                                                            No Record Found.</div>
                                                                    </NoRecordsTemplate>
                                                                    <Columns>
                                                                        <telerik:GridTemplateColumn>
<ItemTemplate>
<table id="tblDate0" cellpadding="0" cellspacing="0" border="0" runat="server" visible="false">
                                                                                    <tr valign="top">
                                                                                        <td valign="top">
                                                                                            <asp:TextBox ID="txtDate0" SkinID="textbox" Font-Size="13px" Text="" Width="67px"
                                                                                                runat="server" />
                                                                                        </td>
                                                                                        <td valign="top" align="left">
                                                                                           <img src="~/Images/calendar.gif" alt="Click here to get date" width="19" height="20"
                                                                                                    vspace="0" border="0" id="imgFromDate0" runat="server" />
                                                                                        </td>
                                                                                        <td>
                                                                                            <AJAX:CalendarExtender ID="CalendarExtender0" runat="server" TargetControlID="txtDate0"
                                                                                                Format="dd/MM/yyyy" PopupButtonID="imgFromDate0" EnabledOnClient="true">
                                                                                            </AJAX:CalendarExtender>
                                                                                            <AJAX:FilteredTextBoxExtender ID="FilteredTextBoxExtender0" runat="server" Enabled="True"
                                                                                                TargetControlID="txtDate0" FilterType="Custom, Numbers" ValidChars="_/">
                                                                                            </AJAX:FilteredTextBoxExtender>
                                                                                           </td>
                                                                                    </tr>
                                                                                </table>
 </ItemTemplate>
                                                                            <FooterTemplate>
                                                                                <asp:Label ID="lblT0" runat="server" Style="width: 99%; text-align: right;" Text="&nbsp;"
                                                                                    BorderColor="Silver" BorderWidth="1px" SkinID="label" />
                                                                            </FooterTemplate>
                                                                        </telerik:GridTemplateColumn>
</Columns>
                                                                </MasterTableView>
                                                            </telerik:RadGrid>

</ContentTemplate>
                                                                                   </asp:UpdatePanel>
Calender Control is not displaying properly. Also, I attach the screen shot.
Please help me.
I hope Telerik Team help me.
Thanks.

Maria Ilieva
Telerik team
 answered on 29 Oct 2014
2 answers
80 views
I am trying to clear the cleintcertificates on the loading of a radwindow.  What I am trying to do is force users to pick the client certificate agian on the page.  What I have is a radwinow that pops-up with the user agreement.  when they click the agree button it pops-up another radwindow thats sole purpose is to make them pick certificate agian and then it save info and close immediately.  however it is not prompting them for the certificate.  the application is HTTPs and asks for it when they start session and the clearauthenticationcache has worked for me on web pages but for some reason not with radwindow.  Don't know if I need to do something different.

  <tr>
                <td  style="text-align:center">
                    <telerik:RadButton ID="btnAgree" runat="server" ButtonType="LinkButton" Text="Sign Agreement"></telerik:RadButton>
                    <asp:TextBox ID="txtSigned" runat="server" Width="400px" Height="60px" TextMode="MultiLine" ReadOnly="true" Visible="false" Font-Size="X-Small" CssClass="textScolls"></asp:TextBox>
                </td>
            </tr>
        </table>
 
       <telerik:RadWindowManager ID="rdmanager" runat="server" ShowContentDuringLoad="false" CenterIfModal="true" Modal="true" VisibleStatusbar="false" VisibleTitlebar="false" Behaviors="Close" OnClientClose="reloadParent" />
 
  Protected Sub btnAgree_Click(sender As Object, e As EventArgs) Handles btnAgree.Click
        Dim window As RadWindow = New RadWindow()
        window.NavigateUrl = "Sign.aspx"
        window.VisibleOnPageLoad = True
        window.Modal = True
        window.Width = "100"
        window.Height = "100"
        rdmanager.Windows.Add(window)
    End Sub
 
Here is code for the sign RAdwindow
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
         <script type="text/javascript">
             function Clear() {
                 document.execCommand("ClearAuthenticationCache");
             }
 
             function GetRadWindow() {
                 var oWindow = null;
                 if (window.radWindow) oWindow = window.radWindow
                 else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                 return oWindow;
             }
 
             function reloadParent() {
                 var oWnd = GetRadWindow();
                 oWnd.close();
             }
         </script>
</head>
<body onload="Clear()">
    <form id="form1" runat="server">
        <div>
            <asp:HiddenField ID="HFSign" runat="server" Visible="false" />
        </div>
    </form>
</body>
</html>
 
  Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        If Page.Request.ClientCertificate.IsPresent Then
            Dim certName As String = Page.Request.ClientCertificate.Item("SubjectCN")
            Dim issue As String = Page.Request.ClientCertificate.Item("Issuer")
 
            HFSign.Value = "Digitally Signed By: " & vbCrLf & " " _
                & certName & vbCrLf & " " _
                & "DN: " & issue & vbCrLf & " " _
                & "cn= " & certName & vbCrLf & " " _
                & "Date: " & Date.Now
 
            SavePage()
        End If
    End Sub
 
 
    Private Sub SavePage()
        sql = "IF Exists (Select intAdminId from tblSignedAgreement where intAdminId = " & GetPersId() & ") Update tblSignedAgreement SET dtsigned = '" & Date.Now & "', strsigned = '" & HFSign.Value & "' where " _
            & "intadminId = " & GetPersId() & " ELSE Insert tblSignedAgreement (intAdminId, dtSigned, strSigned) VALUES (" & GetPersId() & ", '" & Date.Now & "', '" & HFSign.Value & "')"
 
        insertUpdateDelete(sql)
 
        ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "ReloadScheduler", "reloadParent();", True)
        
    End Sub






















Marin Bratanov
Telerik team
 answered on 29 Oct 2014
1 answer
160 views
Im trying to open radwindow on radgrid image button click event. It woks fine when one user is trying to save data on radwindow. But issue is when there are multiple users on the application and on same page and trying to enter their data on radwindow its not saving data correctly.


Can some one help me on this issue.
Marin Bratanov
Telerik team
 answered on 29 Oct 2014
3 answers
62 views
I have some radcontrols as RadTextBox, RadComboBox, RadDatePicker.

I want them stay one line but i can't.

They display perfect on Chrome but IE is not.

pictures below :
Viktor Tachev
Telerik team
 answered on 29 Oct 2014
3 answers
90 views
I'm using a radgrid with InPlace edit.  I added the following settings to freeze column headers.
ClientSettings-Scrolling-AllowScroll="true"
ClientSettings-Scrolling-UseStaticHeaders="true"

The dynamically generated command buttons are being chopped off as shown.  I haven't been able to resolve.

Any help would be appreciated.

Pete
Top achievements
Rank 1
 answered on 29 Oct 2014
1 answer
78 views
Hi,

I'm using code snippet as follows:
Title = string.Format("<a class=\"LeadStory\" href=\"/Report/{0}/{1}\"><h1>{2}</h1></a>",
                            ds.Tables[0].Rows[0]["report_id"].ToString(),
                            aaHelper.Text.StripText.UrlTitle(ds.Tables[0].Rows[0]["title"].ToString()),
                            ds.Tables[0].Rows[0]["title"].ToString());
 
                    ReadMore = string.Format("<a class=\"LeadFullReport\" href=\"Report/{0}/{1}\">full report</a>",
                        ds.Tables[0].Rows[0]["report_id"].ToString(),
                        aaHelper.Text.StripText.UrlTitle(ds.Tables[0].Rows[0]["title"].ToString()));
RadEditor1.Snippets.Add("Lead Title", Title);
                    RadEditor1.Snippets.Add("Full Report", ReadMore);
When I insert both code snippets, the "Full Report" works correctly, but the problem is with the "Title", where the editor generate it like: <a....></a><h1>....</h1>
Even when I manually change the code in HTML view then switch back to design view, the editor change the code again.

I'm using version 2014.2.724.45

Any idea?
Ianko
Telerik team
 answered on 29 Oct 2014
1 answer
135 views
I thought I'd share this method I use to access the data from a selected row through Javascript.

I have, on many occasions, a need to access the information in a selected row from Javascript on a RadGrid row selected, through the use of the following property in the RadGrid declaration:
    <ClientEvents OnRowSelected="OnRowSelected" />

Traditionally, I have used the standard way of accessing the data one element at a time: 
function OnRowSelected(sender, eventArgs) {
    var MasterTable = sender.get_masterTableView();
    var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
    var someVar= MasterTable.getCellByColumnUniqueName(row, 'someColumnName').innerHTML;

In my usual use, I will need to access many, if not all, of the value from that selected row.  This would require a variable declaration for each column's data, which isn't that bad when you are only dealing with a handful of columns but can become a chore when there are many columns.  I had a RadGrid that had 20+ columns with the need to access every one of the columns to dynamically populate certain html elements on the row click (all client-side), requiring quite a bit of JS code. 

All this led to me coming up with this method of collecting all the columns of the selected row in an easy-to-use javascript object:
function OnRowSelected(sender, eventArgs) {
    var mt = sender.get_masterTableView();
    var row = mt.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
    var mtCol = mt.get_columns();
    var grdCols = {};
    for (var i = 0; i < mtCol.length; i++) { grdCols[mtCol[i].get_uniqueName()] = ''; }
    for (var k in grdCols) { grdCols[k] = mt.getCellByColumnUniqueName(row, k).innerHTML; }
    alert(grdCols.someColumnUniqueName);
      ...

This declares an empty object, populates a key:value pair of the column unique name and an empty string, and then loops through object and sets the value for each key based on the key name set in the previous step.  To access the data, use the object name (grdCols) and the ColumnUniqueName.  

These generic lines of code can be placed into anywhere a particular row's values are needed.  

Hopefully this can help someone looking for a similar solution.
Konstantin Dikov
Telerik team
 answered on 29 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?