Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
763 views
Hello,

I'm using a RadTabStrip control and I need to hide and show tabs according to a condition and I need it to be using java script, so I'm doing this:

function changeTabVisibility(radTabStripID,tabValue,visible) {
    var tabStrip = $find(radTabStripID);
    var tab = tabStrip.findTabByValue(tabValue);
    tab.set_visible(visible);
}

The problem is that not all the tabs are going to be showed at the beginning, so I need to hide them server side, and if I do a serverTabVariable.Visible=False then is going to fail when I try to set it as visible because the control was never render to the browser.

Basically my question is how can I simulated a tab.set_visible(false); but server side?

I tried doing something like this but it didn't work:

serverTabVariable.Attributes.Add("style", "display:none;"), the tab is been rendered as hide but then I can't set it back to visible.

I hope it is all clear.

Regards,
Adrian Calvo


jim
Top achievements
Rank 1
 answered on 06 Jan 2016
0 answers
108 views

Hello Team,

Recently we have upgraded telerik control ,so application can works fine on IE 11.

In the application ,we have a RadWindow popup to open the SSRS report but suddenly found that print is not working on IE 11 for SSRS (SQL Server 2008 R2)

Is there any possibility to set the browser Compatibility for IE 9 on RadWindow popup like below

I tried in this way <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" > but it didn't work because application is set to work on Edge mode.

I just wanted to set browser Compatibility for IE 9 only for RadWindow popup.

Note : There is a aspx page having user control and from user control, RadWindow popup is getting open to show the SSRS report.

Thanks

Afroz khan

Afroz khan
Top achievements
Rank 1
 asked on 05 Jan 2016
4 answers
199 views
I am using product version 2013.1.417.45 and I can't get my radgrid to work properly in IE (version 11.0.96) when setting the frozen column count.  Grid seems to work as expected in Chrome.

Here is my grid scrolling set up

GridAdapter.Grid.ClientSettings.Scrolling.AllowScroll = true;
GridAdapter.Grid.ClientSettings.Scrolling.UseStaticHeaders = true;
GridAdapter.Grid.ClientSettings.Scrolling.FrozenColumnsCount = 1;
GridAdapter.Grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(500);

I have sorting on some columns (not all), and have widths (in Unit.Pixel) set on column headers and cells; widths vary from column to column but are same for column and corresponding cell.

Please see attached screen shots in both IE and Chrome.

Thank you,
Katie
Viktor Tachev
Telerik team
 answered on 05 Jan 2016
1 answer
159 views

I'd like to display a child collection of my grid's object data source in the detail item template but I'm not sure how to do the databinding.

The grid is bound using the NeedDataSource event. and there are no available DataKeys that I can use because it builds the data in the code-behind.

How do I bind the child collection to a detail template so I can display in a grid-like format?

Viktor Tachev
Telerik team
 answered on 05 Jan 2016
5 answers
109 views

I have two DatePickers on an Edit Template of a grid.  When I'm adding a new record or editing an existing record of the grid, the DatePickers are throwing a script error: 'False' is undefined

 I also have enabled AutoPostBack="true" on the first DatePicker as I need to set a second DatePicker with a future date based on the date entered in the first DatePicker.  The Edit Template is wrapped in an Ajax Loading Panel, and based on this link: http://www.telerik.com/forums/146104-datepicker-script-error, I've set the flag EnablePageHeadUpdate to false and I'm still receiving the script error.

 Any ideas?

 Here's my code:

<telerik:RadGrid runat="server" ID="radAlerts" AllowPaging="True" AllowSorting="True" ShowHeader="True" GridLines="None"
    OnNeedDataSource="radAlerts_OnNeedDataSource" OnItemCommand="radAlerts_OnItemCommand" OnItemDataBound="radAlerts_OnItemDataBound"
    OnInsertCommand="radAlerts_OnInsertCommand" OnUpdateCommand="radAlerts_OnUpdateCommand" OnDeleteCommand="radAlerts_OnDeleteCommand">
    <ClientSettings AllowColumnsReorder="False" EnableRowHoverStyle="True" EnablePostBackOnRowClick="True">
        <Selecting AllowRowSelect="True"></Selecting>
        <Scrolling UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
    <MasterTableView DataKeyNames="AlertId" AutoGenerateColumns="False" AllowMultiColumnSorting="True" EnableHeaderContextMenu="True"
        CommandItemDisplay="TopAndBottom" Height="100%">
        <NoRecordsTemplate>No Active Alerts.</NoRecordsTemplate>
        <CommandItemSettings ShowAddNewRecordButton="True" ShowCancelChangesButton="False" ShowSaveChangesButton="False" ShowRefreshButton="True" />
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <HeaderStyle Width="1%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Width="1%"></ItemStyle>
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ConfirmText="Deactivate this item?" ConfirmDialogType="RadWindow" ConfirmTitle="Deactivate" ButtonType="ImageButton"
                CommandName="Delete" ConfirmDialogHeight="160px" ConfirmDialogWidth="250px" UniqueName="DeleteColumn">
                <HeaderStyle Width="1%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" Width="1%"></ItemStyle>
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn DataField="AlertId" HeaderText="ID" Visible="False"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Alert">
                <HeaderStyle Width="50%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left"></ItemStyle>
                <ItemTemplate>
                    <a href='viewattachment.aspx?alert_id=<%# Eval("AlertId") %>' target="_blank"><%# Eval("Title") %></a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridDateTimeColumn DataField="StartDate" HeaderText="Start Date" DataFormatString="{0:d}" FilterControlWidth="80%" AutoPostBackOnFilter="True">
                <HeaderStyle Width="10%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left"></ItemStyle>
            </telerik:GridDateTimeColumn>
            <telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date" DataFormatString="{0:d}" FilterControlWidth="80%" AutoPostBackOnFilter="True">
                <HeaderStyle Width="10%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left"></ItemStyle>
            </telerik:GridDateTimeColumn>
            <telerik:GridCheckBoxColumn DataField="Inactive" HeaderText="Inactive" AutoPostBackOnFilter="True">
                <HeaderStyle Width="5%"></HeaderStyle>
                <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" Width="5%"></ItemStyle>
            </telerik:GridCheckBoxColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn UniqueName="AlertId" />
            <FormTemplate>
                <telerik:RadAjaxLoadingPanel runat="server" ID="radLpAlertTemplate"></telerik:RadAjaxLoadingPanel>
                <table class="editTable">
                    <tr>
                        <td class="left" style="width: 90px"><asp:Label runat="server" ID="lblTitle" Text="Title:"></asp:Label></td>
                        <td class="left">
                            <telerik:RadTextBox runat="server" ID="radAlertTitle" Width="80%" ClientIDMode="Static" MaxLength="100"></telerik:RadTextBox>
                            <asp:RequiredFieldValidator runat="server" ID="rvAlertTitle" ControlToValidate="radAlertTitle" ErrorMessage="Please enter alert text"
                                Display="Dynamic" ForeColor="Firebrick">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="left"><asp:Label runat="server" ID="lblExitingFile" Text="Existing file:"></asp:Label></td>
                        <td class="left"><asp:HyperLink runat="server" ID="hlAlertFile"></asp:HyperLink></td>
                    </tr>
                    <tr>
                        <td class="left"><asp:Label runat="server" ID="lblFile" Text="File: "></asp:Label></td>
                        <td class="left">
                            <telerik:RadAsyncUpload runat="server" ID="radAlertUpload" MaxFileInputsCount="1" Width="50%" />
                        </td>
                    </tr>
                    <tr>
                        <td class="left"><asp:Label runat="server" ID="lblStartDate" Text="Start Date:"></asp:Label></td>
                        <td class="left">
                            <telerik:RadDatePicker runat="server" ID="radAlertStartDate" AutoPostBack="True"
                                OnSelectedDateChanged="radAlertStartDate_OnSelectedDateChanged">
                                <Calendar>
                                    <SpecialDays>
                                        <telerik:RadCalendarDay Repeatable="Today">
                                            <ItemStyle BackColor="LightGray" Font-Bold="True" BorderStyle="Solid" BorderColor="Black" BorderWidth="1px"></ItemStyle>
                                        </telerik:RadCalendarDay>
                                    </SpecialDays>
                                </Calendar>
                                <DateInput DisplayDateFormat="yyyy-MM-dd" DateFormat="yyyy-MM-dd"></DateInput>
                            </telerik:RadDatePicker>
                            <asp:RequiredFieldValidator runat="server" ID="rvStartDate" ControlToValidate="radAlertStartDate" ErrorMessage="Please enter a Starting Date"
                                Display="Dynamic">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="left"><asp:Label runat="server" ID="lblEndDate" Text="End Date:"></asp:Label></td>
                        <td class="left">
                            <telerik:RadDatePicker runat="server" ID="radAlertEndDate">
                                <Calendar>
                                    <SpecialDays>
                                        <telerik:RadCalendarDay Repeatable="Today">
                                            <ItemStyle BackColor="LightGray" Font-Bold="True" BorderStyle="Solid" BorderColor="Black" BorderWidth="1px"></ItemStyle>
                                        </telerik:RadCalendarDay>
                                    </SpecialDays>
                                </Calendar>
                                <DateInput DisplayDateFormat="yyyy-MM-dd" DateFormat="yyyy-MM-dd"></DateInput>
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:CheckBox runat="server" ID="cbInactive" Text="Inactive" Checked="False" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"> </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="text-align: left">
                            <asp:Button runat="server" ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />
                            <asp:Button runat="server" ID="btnCancel" Text="Cancel" CommandName="Cancel" CausesValidation="False" />
                        </td>
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

Viktor Tachev
Telerik team
 answered on 05 Jan 2016
4 answers
91 views

Guys honestly wouldn't it be easy to add an OnClientSelected event to TreeView?  I see you are changing the Div class from "rtBot" to "rtBot rtSelected".  So you know it is happening.  So many people have asked about this over the years and I find it annoying to try and do a hack with the OnKeyPressed.

 Please?

 

Sean

 

Ivan Danchev
Telerik team
 answered on 05 Jan 2016
3 answers
673 views

Hi,

For the RadHtmlChart I was wondering if there is any way to change the background color of the main chart area only like you could with RadChart?

Appearance.FillStyle.BackgroundColor controls the background to everything including legend, title and axes

PlotArea.Appearance.FillStyle.BackgroundColor colors the main chart area AND the area behind the y-axis labels which looks a bit odd. I've attached examples with RadChart and RadHtmlChart for comparison. We'd like everything but the main chart area to be transparent so whatever is behind the chart can be displayed, in this case a gray RadDock.

Many thanks,

Andy

 

Danail Vasilev
Telerik team
 answered on 05 Jan 2016
8 answers
334 views
I have a RadGrid with 24 Template Columns. These columns are generated during runtime based on a dateset. I also set the width of the columns to a set width depending on the size of the data in the columns (although most of the columns are the same size as each other)
 (e.g. col.HeaderStyle.Width = Unit.Pixel(80)). In client settings I have horizontal scrolling enabled (as the grid is a set width but the data is extended) and the FrozenColumnsCount="2".
This all works fine- The correct data displayed, correct widths and when I scroll right the 1st two columns remain where they are whilst the others scroll allowing me to nicely compare.

This Issue is when I scroll to the very far right (the very last column). When the scrollbar reaches the very end all columns including the first two columns that are frozen have their width increased by a noticeable amount. This looks a bit weird and I was hoping to be ale to change some setting so that it doesn't change the width. I've tried many settings such as to set TableLayout in MasterTableView to fixed and set AllowColumnResize to false but this had no effect on the issue.

Do you know of a solution?
Thank You

Code Below:
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" OnInit="RadGrid1_Init" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" CssClass="cssGrid" Skin="Vista" ClientSettings-AllowRowHide="true" 
        ClientSettings-AllowColumnHide="true" ClientSettings-AllowColumnsReorder="true" ClientSettings-AllowKeyboardNavigation="true" 
        AllowFilteringByColumn="false" ClientSettings-Resizing-ClipCellContentOnResize="true" HeaderStyle-Wrap="false" HeaderStyle-CssClass="cssColumns" HeaderStyle-HorizontalAlign="Center">
            <MasterTableView CommandItemDisplay="Bottom" AutoGenerateColumns="false">
<Columns>
...
</Columns>
</MasterTableView>
           <ClientSettings>
                <Resizing AllowColumnResize="true" EnableRealTimeResize="true" ShowRowIndicatorColumn="false" AllowResizeToFit="true" AllowRowResize="true" />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="1" />
                <Selecting AllowRowSelect="true" />
            </ClientSettings>
Venelin
Telerik team
 answered on 05 Jan 2016
3 answers
207 views
Hi,

We repurchased our license for the toolkit, in part to get a fix for the issue that we saw was listed as fixed in the release notes...

http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q3-2011-version-2011-3-1115.aspx

Fixed: RadGrid's horizontal scroll is not moved in IE when having frozen columns and you click on the scroll bar


Before this update, when we clicked on the area to the left or right of the scrollbar, there was no scrolling action.
After the update, we have found that this is fixed.

But, we have found, that if we resize our browser window which causes a resize of our grid (width is set to 100%), horizontal scrolling is broken again.

It will not work until we re-rerender the page, and the grid is re-rendered with the new size, coming from the server. Any client side re-sizing causes the horizontal scrolling to break again for us.

This is occurring in IE 8 and 9 for us.

Thanks,
Rich
Pavlina
Telerik team
 answered on 05 Jan 2016
1 answer
318 views

Hi,

I am using Grid - Virtualization. But when I try to load huge data getting an error "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." where as also I am using  "OnNeedDataSource"

As per my requirement I need to create Grid columns at run time as don't know how many columns and rows we be there as query output.

I have also used below code in my config file but don't get any success

 <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="2147483647" />
      </webServices>
    </scripting>
  </system.web.extensions>

 

Can any body help me out in this.

Thanks

Pavlina
Telerik team
 answered on 05 Jan 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?