Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
I have a page that, among other things, holds an image and a radrotator. When clicking one of the elements of the rotator, the image above is the full-size version of the clicked radrotator thumbnail.

Now, I want a popup (radwindow) that contains basically the exact same thing as the main page. I have everything set up - or so I thought - but the displayed image never changes when I click an item in the rotator. The rotator seems to load fine, though.

I'm rather new at this, but would like to know where it'd be a good idea for me to look next.
Slav
Telerik team
 answered on 31 Jul 2013
4 answers
130 views
Hi all,

So i havea radgrid that its exporting to pdf by itextsharp, for that no problem, the problem is when i remebered to use the filter of the radgrid,
when i have a filter, the pdf its exported as a full pdf and not only the filter information. Anybody tried something sililar?

Best Regadrs
Kostadin
Telerik team
 answered on 31 Jul 2013
4 answers
126 views
I have radgrid with client-side databinding that I wish to show/hide columns on (via javascript) for real estate reasons.

In general, the showing and hiding of columns works until the grid is rebound while the grid is in it's collapsed (7 columns hidden) view.  After rebinding, when trying to re-show hidden columns, I encounter a javascript error "htmlfile: Type mismatch."  inside a call to _removeRestoreCol(this,a,c) when attempting to c.appendChild(this._hiddenCols[g].col); - (This, of course, is from the stack call from within a ScriptResource file.)

I have found that in some cases after the first rebind, the show/hide functions properly but after subsequent rebinds I encounter the Type mismatch error.

I am seeing this error in IE7 but not in Chrome or IE8.  I am using the 2012 Q3 release.

Any assistance in debugging, suggestions for fixes, or alternate approaches to showing/hiding would be much appreciated.

My grid markup:

<telerik:RadGrid ID="SequenceGrid" runat="server" AllowPaging="True"
    PageSize="10" GridLines="None" AllowFilteringByColumn="false"
    AllowSorting="True" Skin="Sunset" TabIndex="13" AllowMultiRowSelection="true" >
    <PagerStyle AlwaysVisible="true" Position="Bottom" />
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="id, testCaseGroupInd" ClientDataKeyNames="id, TCStatusColor, StatusColor, Tags, testCaseGroupInd, SeqName" Width="100%"> <%--TableLayout="Fixed"--%>
        <Columns>
            <telerik:GridBoundColumn DataField="id" HeaderText="ID" SortExpression="id"
                UniqueName="id">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" Width="50px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="SeqName" HeaderText="Name" SortExpression="SeqName"
                UniqueName="Sequence">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TestCaseStatus" HeaderText="Test Case / Group Status" SortExpression="TestCaseStatus"
                UniqueName="test_case_status">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Uploaded" HeaderText="Uploaded"
                 UniqueName="upload_status">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedBy" HeaderText="Created By" SortExpression="CreatedBy"
                UniqueName="created_by">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ModifiedBy" HeaderText="Last Modified By" SortExpression="ModifiedBy"
                UniqueName="last_modified_by">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Project" HeaderText="Project" SortExpression="project"
                UniqueName="project">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Tags" DataField="id" UniqueName="tag_link" SortExpression="Tags" >
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ExecutionTime" HeaderText="Scheduled Run Time" SortExpression="ExecutionTime"
                UniqueName="execution_time">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" ForeColor="White" />
            </telerik:GridBoundColumn>
            <telerik:GridButtonColumn Display="false" HeaderStyle-Width="20px" UniqueName="AddToGroup" ButtonType="ImageButton" CommandName="AddToGroup"
                Text="Add to Group" ImageUrl="~/Images/AddRecord.png" >
            </telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings AllowColumnsReorder="false" AllowRowsDragDrop="True" >
        <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />
        <%--<Scrolling AllowScroll="true" EnableVirtualScrollPaging="true" UseStaticHeaders="true" />--%>
        <DataBinding SelectMethod="GetDataAndCount" Location="AutomationDeck.svc"
             SortParameterType="String" FilterParameterType="String" />
        <ClientEvents OnDataBound="SequenceGrid_OnDataBound" OnDataBinding="SequenceGrid_OnDataBinding"
            OnRowContextMenu="RowContextMenu" OnDataBindingFailed="SequenceGrid_OnDataBindingFailed"
            OnCommand="SequenceGrid_Command" OnRowDropping="GroupItemsGrid_onRowDropping" OnRowDragStarted="GroupItemsGrid_OnRowDragStarted" />
    </ClientSettings>
</telerik:RadGrid>

The javascript that performs the showing/hiding is as follows:

function collapse() {
      
     var SeqGrid = $telerik.findGrid("<%= SequenceGrid.ClientID %>");
     SeqGrid.get_masterTableView().hideColumn(2);
     SeqGrid.get_masterTableView().hideColumn(3);
     SeqGrid.get_masterTableView().hideColumn(4);
     SeqGrid.get_masterTableView().hideColumn(5);
     SeqGrid.get_masterTableView().hideColumn(6);
     SeqGrid.get_masterTableView().hideColumn(7);
     SeqGrid.get_masterTableView().hideColumn(8);
     SeqGrid.get_masterTableView().showColumn(9);
}
 
 function expand() {
 
     var SeqGrid = $telerik.findGrid("<%= SequenceGrid.ClientID %>");
     SeqGrid.get_masterTableView().hideColumn(9);
     SeqGrid.get_masterTableView().showColumn(2);
     SeqGrid.get_masterTableView().showColumn(3);
     SeqGrid.get_masterTableView().showColumn(4);
     SeqGrid.get_masterTableView().showColumn(5);
     SeqGrid.get_masterTableView().showColumn(6);
     SeqGrid.get_masterTableView().showColumn(7);
     SeqGrid.get_masterTableView().showColumn(8);
 }

Martin
Telerik team
 answered on 31 Jul 2013
4 answers
151 views
Hi!
I wanted to export several radgrids to a Word document, so I found out an example that suggested to wrap the grids into a global grid.
That's what I've done with the structure below: 
The problem I'm facing is in my Word document there is a string with the literal "Item" below the caption "This is the caption" and before my inner radgrid. 
I'm never setting this string, so I guess it's a default value I don't even know how to change. I don't know how to hide it in the Word document, although I managed to hide it with css in the web layer. 
Any suggestion would be appreciated, 

Thanks in advance,

Mary.

 <telerik:RadGrid ID="RadGridWrapper" runat="server" BorderStyle="None" ShowHeader="false" ShowFooter="false"    
        OnGridExporting="OnGridExporting"> 
        <MasterTableView AutoGenerateColumns="true" ShowHeadersWhenNoRecords="true" 
        NoMasterRecordsText="<%$ Resources:GlobalResources, NoResults%>"
        ShowHeader="true" ShowFooter="false" Caption="This is the caption"  >
            <ItemTemplate>
                <telerik:RadGrid ID="RadGrid1" runat="server"
                 GridLines="Both" Skin="Windows7"
                    HorizontalAlign="Center" AutoGenerateColumns="false"
                     OnNeedDataSource="RadGrid_NeedDataSource1" >
<MasterTableView> ... </MasterTableView>
    </telerik:RadGrid>
    <telerik:RadGrid ID="RadGrid2" runat="server" GridLines="Both" 
                OnNeedDataSource="RadGrid_NeedDataSource2"
                    Skin="Windows7" HorizontalAlign="Center" AutoGenerateColumns="false">
<MasterTableView> ... </MasterTableView>
    </telerik:RadGrid>
  </ItemTemplate>           
        </MasterTableView>
    </telerik:RadGrid>


Kostadin
Telerik team
 answered on 31 Jul 2013
2 answers
129 views

Hi there

I am exporting a Grid in Biff Format which is successfully exporting - however I want to allow the user to be able to change values in one column only (e.g column 3)

If the user attempts to changes any other columns they would get a warning from Excel advising them the cell is protected.

I believe this can be done in the "ExcelMLWorkBookCreated" but am not sure what the code needs to be so it can loop through all the columns - below is what I have so far....

Any help much appreciated....

protected void gridPricing_ExportToExcel_ExcelMLWorkBookCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExcelMLWorkBookCreatedEventArgs e)
       {
           e.WorkBook.Worksheets[0].IsProtected = true;
           StyleElement protectionStyle = new StyleElement("ProtectionStyle");
           protectionStyle.CellProtection.IsProtected = false;
           e.WorkBook.Styles.Add(protectionStyle);
             
           foreach (ColumnElement column in e.WorkBook.Worksheets[0].Table.Columns)
           {
               int columnindex = e.WorkBook.Worksheets[0].Table.Columns.IndexOf(column);
               if (columnindex == 3)
               {
                    
                   //code NEEDED in here needs to loop through cells or columns 
                   //and get cellelement or columnelement
                   // so I can set the cell.stylevalue for this column
               }
           }
Kostadin
Telerik team
 answered on 31 Jul 2013
2 answers
84 views
Hi

I have come across a strange behavior with the numerictextbox. There are four radtabs and the second tab has a numerictextbox in it. If I enter something inside it and suddenly move to another tab, value is lost. But if I move to another tab on clicking outside the numerictextbox value persists. Is it a bug?

Thanks
Anu
Shinu
Top achievements
Rank 2
 answered on 31 Jul 2013
5 answers
123 views
Hi telerik

In a radmonthyearpicker, please help me to access the today button to give my own text and styling.

Thankyou
Anu
Shinu
Top achievements
Rank 2
 answered on 31 Jul 2013
2 answers
156 views
Hello,

I am currently using radgrid client-side databinding, very similar to the example here: http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx

What I want to do is have the user page, sort, filter, select rows, etc and have the server-side code capturing those values in session.  If for any reason the page is refreshed, I want to initialize the grid back to those session values (sort/filter/page/selected row).

I can get almost all of this working with the exception of the page index.  It appears to work, but then the grid immediately fires a page change back to page 0.

Any insight into why this is happening?



Yew
Top achievements
Rank 1
 answered on 31 Jul 2013
2 answers
712 views
Hi

How can I add a icon to the right most position in a Radtextbox?

Thanks for replying
Katya
Gabriel
Top achievements
Rank 2
 answered on 30 Jul 2013
1 answer
189 views
Hi,

 I need to disable some fields on the client side on page load that I will later enable via JavaScript.  Doing this from the server side is not supported so I'm doing this by calling a JavaScript function from the jquery document ready as in:
$(document).ready(function() {
                                                        // Handler for .ready() called.
                                                        initialize();
                                                        //setVisibleMarkers();
                                                        alert("document.ready");
                                                        enableMailingLabelsButton();
                                                        EnableCustomTemplates();
                                                    });

the enableMailingLabelsButton is as follows:

function enableMailingLabelsButton()
{
     
    var btnPrintMailingLabels = document.getElementById('<%=btnPrintMailingLabels.ClientID%>');
    var btnRefresh = document.getElementById('<%=btnRefresh.ClientID%>');
    var ddlMailingList = document.getElementById('<%=ddlMailingList.ClientID %>');
    var rdoSelectNew = document.getElementById('<%=rdoSelectNew.ClientID %>');
    var rdoSelectDefault = document.getElementById('<%=rdoSelectDefault.ClientID %>');
    var rdoSelectDateRange = document.getElementById('<%=rdoSelectDateRange.ClientID %>');
    var rdoPreviousDataSet = document.getElementById('<%=rdoPreviousDataSet.ClientID %>');
    var txt1ClickNumberToPrint = $find('<%= txt1ClickNumberToPrint.ClientID %>')
    var txtDateRangeNumberToPrint = $find('<%= txtDateRangeNumberToPrint.ClientID %>')
    var rdiStartDate = $find('<%= rdiStartDate.ClientID %>')
    var rdiEndDate = $find('<%= rdiEndDate.ClientID %>')
 
    if (rdoSelectNew.checked == true)
    {
        //alert(rdiStartDate);
        rdiStartDate.disable();
        rdiEndDate.disable();
        txt1ClickNumberToPrint.disable();
        txtDateRangeNumberToPrint.disable();
        ddlMailingList.disabled = true;
        btnPrintMailingLabels.disabled = true;
        btnRefresh.disabled = true;
    }
    else if (rdoSelectDefault.checked == true)
    {
        rdiStartDate.disable();
        rdiEndDate.disable();
        txt1ClickNumberToPrint.enable();
        txtDateRangeNumberToPrint.disable();
        ddlMailingList.disabled = true;
        btnRefresh.disabled = false;
        btnPrintMailingLabels.disabled = true;
    }
    else if (rdoSelectDateRange.checked == true)
    {
        rdiStartDate.enable();
        rdiEndDate.enable();
        txt1ClickNumberToPrint.disable();
        txtDateRangeNumberToPrint.enable();
        ddlMailingList.disabled = true;
        btnRefresh.disabled = false;
        btnPrintMailingLabels.disabled = true;
    }
    else if (rdoPreviousDataSet.checked == true)
    {
     
        rdiStartDate.disable();
        rdiEndDate.disable();
        txt1ClickNumberToPrint.disable();
        txtDateRangeNumberToPrint.disable();
        ddlMailingList.disabled = false;
        btnRefresh.disabled = false;
        if (ddlMailingList.selectedIndex >= 0 ) {
            //       alert("making labels active");
            btnPrintMailingLabels.disabled = false;
        }
        else {
            //       alert("making labels inactive");
            btnPrintMailingLabels.disabled = true;
        }
    }
}

The line var txt1ClickNumberToPrint = $find('<%= txt1ClickNumberToPrint.ClientID %>')  
shows a null after execution 
in the  txt1ClickNumberToPrint field, so when trying to disable this field the javascript throws an error on
page load and stops executing only in IE 10 on first load.  once the page is loaded things work fine also
Chrome does not have an issue at all.  I'd appreciate any help.  Here is the markup for that section.

<fieldset style="width:100%;">
<legend>Select Your Data Set:</legend>
<table class="signup-label" cellpadding="5px">
<tr>
<td ><asp:RadioButton Checked="true" runat="server" ID="rdoSelectNew" GroupName="select" /></td>
<td align="left" valign="baseline">Just my NEW leads please!</td>
</tr>
<tr>                                           
<td><asp:RadioButton runat="server" ID="rdoSelectDefault" GroupName="select" /></td>
<td align="left" valign="baseline">The most recent <telerik:RadNumericTextbox ID="txt1ClickNumberToPrint" runat="server" NumberFormat-DecimalDigits="0" Width="50px"></telerik:RadNumericTextbox> leads!</td>
</tr>
<tr>                                           
<td><asp:RadioButton runat="server" ID="rdoSelectDateRange" GroupName="select" /></td>
<td align="left" valign="baseline">The most recent <telerik:RadNumericTextbox ID="txtDateRangeNumberToPrint" runat="server" NumberFormat-DecimalDigits="0" Width="50px"></telerik:RadNumericTextbox> leads between the start date of <telerik:RadDateInput ID="rdiStartDate" runat="server"></telerik:RadDateInput>  and the end date of <telerik:RadDateInput ID="rdiEndDate" runat="server"></telerik:RadDateInput>!</td>
</tr>
<tr>                                           
<td><asp:RadioButton runat="server" ID="rdoPreviousDataSet" GroupName="select" /></td>
<td align="left" >
<table cellpadding="2">
<tr>
<td>An Existing Mailing List:</td>
<td><asp:DropDownList ID="ddlMailingList" runat="server"  SkinID="ExtraWideDll" DataTextField="Name" DataValueField="ID"></asp:DropDownList></td>
<td><asp:ImageButton class="norm" ID="btnRefresh" runat="server" AlternateText="Refresh" ToolTip="Refresh the list of Mailing Lists" ImageUrl="./images/Refresh.gif" onclick="btnRefresh_Click" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" colspan="2" ><asp:Button ID="btnGetData"  runat="server" Text="Print" onclick="btnGetData_Click" ToolTip="Print using the selected template!" />
<asp:Button ID="btnPrintMailingLabels"  runat="server" ToolTip="Print Mailing Labels for an existing mailing list!"
                                                        Text="Get Mailing Labels" onclick="btnPrintMailingLabels_Click"  /><img title="Use the 'Print' Button to create a new mailing list, then use the 'Get Mailing Labels' button to get the mailing labels for the Mailing List." class="tooltip" src="./images/question.png" /></td>
</tr>
<tr>
<td align="left" colspan="2" ><asp:Label CssClass="error" runat="server" ID="lblMessage"></asp:Label></td>
</tr>
</table>
</fieldset>



Jonathan
Top achievements
Rank 1
 answered on 30 Jul 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?