Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
202 views

Hi,

 I have nested checkboxes when I select a checkbox it should select all the checkboxes below as well and same when I deselect top most checkbox. However this isn't happening. I have the following code.

 aspx:

<telerik:RadGrid ID="rgExpiringServices" OnNeedDataSource="rgExpiringServices_NeedDataSource" OnItemCommand="rgExpiringServices_ItemCommand" AllowFilteringByColumn="true" OnPreRender="rgExpiringServices_PreRender" runat="server" Skin="Black" AllowMultiRowSelection="true">
        <ClientSettings Selecting-AllowRowSelect="true" Selecting-UseClientSelectColumnOnly="true" ClientEvents-OnRowSelected="nestedGridRowSelected" ClientEvents-OnRowDeselected="nestedGridRowDeselected"></ClientSettings>
        <MasterTableView DataKeyNames="ObjectId, Name" AutoGenerateColumns="false" ShowFooter="true" HierarchyLoadMode="ServerOnDemand" EnableHierarchyExpandAll="true" AllowFilteringByColumn="true">
            <Columns>
                <telerik:GridClientSelectColumn UniqueName="BulkActionSelect" HeaderText="<%$ Resources:NrttLanguage, BulkAction %>"  ></telerik:GridClientSelectColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" ButtonCssClass="btnTiny btnApprove" UniqueName="Renew" CommandName="Renew" ImageUrl="~/Images/blank16.png" HeaderStyle-Width="16px" ItemStyle-Width="16px" ></telerik:GridButtonColumn>
                <telerik:GridButtonColumn ButtonType="ImageButton" ButtonCssClass="btnTiny btnDelete" UniqueName="Terminate" CommandName="Terminate" ImageUrl="~/Images/blank16.png" HeaderStyle-Width="16px" ItemStyle-Width="16px" ></telerik:GridButtonColumn>
                <telerik:GridNumericColumn UniqueName="Name" DataField="Name" HeaderText="<%$ Resources:NrttLanguage, CustomerReference %>" DataType="System.String"> </telerik:GridNumericColumn>
                <telerik:GridDateTimeColumn DataField="DateExpiration" DataType="System.DateTime" FilterControlAltText="Filter DateImportant column" HeaderText="<%$ Resources:NrttLanguage, DateExpiring%>" SortExpression="DateImportant" UniqueName="DateImportant" DataFormatString="{0:d}" >
                </telerik:GridDateTimeColumn>
                <telerik:GridNumericColumn UniqueName="Daysuntilexpired" DataField="DaysUntilExpiration" HeaderText="<%$ Resources:NrttLanguage, daysuntilexpired %>" > </telerik:GridNumericColumn>
                <telerik:GridBoundColumn UniqueName="Services" DataField="ServiceInReferenceString" HeaderText="<%$ Resources:NrttLanguage, Services %>" ></telerik:GridBoundColumn>
                <telerik:GridNumericColumn UniqueName="Parcelcount" DataField="RealInReference" HeaderText="<%$ Resources:NrttLanguage, ParcelCount %>" > </telerik:GridNumericColumn>
            </Columns>
            <NestedViewTemplate>
                <nrtt:CustomerGrid ID="ucExpiringRealServices" runat="server" AllowSelection="true" OnNeedDataSource="ucExpiringRealServices_NeedDataSource" OnNeedColumnCollection="ucExpiringRealServices_NeedColumnCollection" OnItemDataBound="ucExpiringRealServices_ItemDataBound" ></nrtt:CustomerGrid>
            </NestedViewTemplate>
        </MasterTableView>
    </telerik:RadGrid>

 

 

JavaScript:

function nestedGridRowSelected(sender, args) {
    var item = args.get_gridDataItem();
    var nv = item.get_nestedViews();
    if (nv !== undefined && nv !== null) {
        nv.selectAllItems();
    } else {
        //is child
        var mt = sender.get_masterTableView();
        var dtv = args.get_tableView();
        mt.selectItem(dtv.get_parentRow());
    }
}
 
function nestedGridRowDeselected(sender, args) {
    var item = args.get_gridDataItem();
    var nv = item.get_nestedViews()[0];
    if (nv !== undefined && nv !== null) {
        nv.clearSelectedItems();
    } else {
        //is child
        var mt = sender.get_masterTableView();
        var dtv = args.get_tableView();
        mt.selectItem(dtv.get_parentRow());
    }
}

When I debug it tells me that item.get_nestedViews() is undefined. Any help appreciated.

 Thanks!

 

 
Aniket
Top achievements
Rank 1
 answered on 06 Jan 2016
1 answer
112 views
Is there a way to change the textbox in the filter to a date picker?
Viktor Tachev
Telerik team
 answered on 06 Jan 2016
6 answers
295 views

Hi,

When i paste text from MS word (Times New roman, 12 pt) in to the editor, the editor is changing the font name to 'Segoe UI' for some part of the text automatically. This issue is with only some of the word documents i have. I am not able to attach the same word document with this thread as there is no option to attach word format but i have tested it on http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx link and the same issue exists.

Ianko
Telerik team
 answered on 06 Jan 2016
1 answer
107 views
 Hi, I just want to change text for "Day,Week,Month" buttons, please someone help me out.
Bozhidar
Telerik team
 answered on 06 Jan 2016
5 answers
846 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
138 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
264 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
204 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
135 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
114 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?