Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
451 views
Hi,

Is the functionality of Reordering the columns supported in RadTreeList. That is dragging and dropping of columns.

Also in RadTreeList, how can we implement it so that the client can increase and decrease the width of the columns. I am using TreeListboundColumn currently.

Thanks in advance.
Marin
Telerik team
 answered on 01 May 2014
3 answers
237 views
We have a MultiPage in part of our app, it's essentially an email preview here:
<code> 
<telerik:RadPageView ID="RadPageView1" runat="server" Visible="true">
                        <div id="divHTMLContent" runat="server">
                            </div>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView2" runat="server" Visible="true">
                        <div id="divPlainText" runat="server">
                            </div>
                    </telerik:RadPageView>
</code>

The problem arises that the HTML Content can contain styles, such as
<code>
<style type="text/css">    
 body      {      
      background-color: #efefef;
      color: #777777;
      font-face: Garamond !important;
      }
</style>
</code>

(deliberately chosen to demonstrate the effects)

These global styles are indeed global. In another context, I was able to <ol><li>introduce an iframe <li>HTMLEncode the content and <li>use jQuery to load the iframe at render time</ol> Any suggestions on how to get similar behaviour?



Ivan Zhekov
Telerik team
 answered on 01 May 2014
1 answer
63 views
Hi,

I'm attempting to replace an existing editor with Telerik.  So far its been ok, except that the statistics module is showing underneath buttons that I have below the editor and I'm not sure why. (image attached)

I note that the editor is in a table which is inside another table and the buttons are in a separate row cell inside the main table.

Thanks
Cheryl
Top achievements
Rank 1
Iron
 answered on 01 May 2014
5 answers
126 views
Hi

Does anyone know how to change the column style when a column is filtered, in a similar way to when you sort a column?

I have a number of grids which are loaded with default filters and it would be nice if I can highlight somehow which filters are already applied when a grid loads.

If it is not possible to change the column style then some other form of highlighting, such as the filter textbox style, would work just as well.

Thanks in advance for any help

Cheers
Rob
Pavlina
Telerik team
 answered on 30 Apr 2014
6 answers
218 views
Hi,

The project I've taken over uses all code behind for creating a grid. The solution calls for using column aggregates. According to other Telerik threads I found that I needed to set UseAllDataFields = true. Upon implementing this I noticed that grouping and paging did not work correctly. The problem is you only get the first page of results. Once you select another page, no records are returned. Filtering does not seem to be affected by this.

Unfortunately, I cannot post all the code (to spread out). However, here are the grid properties:

RadGrid1.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.PushButton;
 
            RadGrid1.MasterTableView.UseAllDataFields = true;
             
            RadGrid1.EnableViewState = true;
            RadGrid1.EnableLinqExpressions = false;
            RadGrid1.AutoGenerateColumns = false;
            RadGrid1.MasterTableView.EnableColumnsViewState = false;         // because the column structure can change on Postback (new Layout)
 
            RadGrid1.ClientSettings.ClientEvents.OnGridCreated = "onGridCreated";
            RadGrid1.ClientSettings.ClientEvents.OnCommand = "onGridCommand";           
            RadGrid1.ClientSettings.ClientEvents.OnColumnResized = "OnGridColumnResized";
            RadGrid1.ClientSettings.ClientEvents.OnColumnSwapped = "OnColumnSwapped";
            RadGrid1.ClientSettings.ClientEvents.OnRowMouseOver = "RowMouseOver";
            RadGrid1.ClientSettings.ClientEvents.OnFilterMenuShowing = "filterMenuShowing";
            RadGrid1.FilterMenu.OnClientShowing = "MenuShowing";
 
 
            RadGrid1.CellSpacing = 2;
            RadGrid1.ShowStatusBar = false;
            RadGrid1.MasterTableView.TableLayout = GridTableLayout.Fixed;
 
            RadGrid1.EnableHeaderContextMenu = true;
 
            RadGrid1.MasterTableView.EditMode = GridEditMode.EditForms;
            RadGrid1.MasterTableView.EditFormSettings.FormStyle.BackColor =      System.Drawing.ColorTranslator.FromHtml("#FFFFDD");
 
 
            RadGrid1.GroupingSettings.ShowUnGroupButton = true;            
            RadGrid1.ClientSettings.AllowDragToGroup = true;
            RadGrid1.ClientSettings.AllowGroupExpandCollapse = true;       
            RadGrid1.MasterTableView.GroupLoadMode = GridGroupLoadMode.Client;      
 
            RadGrid1.GroupingSettings.CaseSensitive = false;           
            RadGrid1.FilterItemStyle.Wrap = false;
 
            RadGrid1.AllowSorting = true;
            RadGrid1.MasterTableView.AllowNaturalSort = false;
            RadGrid1.AllowPaging = true;
            RadGrid1.MasterTableView.PagerStyle.AlwaysVisible = true;
 
 
            RadGrid1.ClientSettings.Scrolling.AllowScroll = true;
            RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
            RadGrid1.ClientSettings.Scrolling.SaveScrollPosition = true;
 
            RadGrid1.ClientSettings.Resizing.AllowColumnResize = true;
            RadGrid1.ClientSettings.Resizing.ClipCellContentOnResize = false;
            RadGrid1.ClientSettings.Resizing.EnableRealTimeResize = false;
            RadGrid1.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
 
            RadGrid1.ClientSettings.AllowColumnsReorder = true;
            RadGrid1.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder;
            RadGrid1.ClientSettings.ReorderColumnsOnClient = false;           
 
            RadGrid1.ClientSettings.EnableRowHoverStyle = true;
            RadGrid1.ClientSettings.Selecting.AllowRowSelect = true;


Any help would be appreciated. 

Thanks.

Blair
Pavlina
Telerik team
 answered on 30 Apr 2014
1 answer
191 views
I'm having trouble in filtering the columns using the RadDateTimePicker for the GridDateTimeColumn. I'm getting the error 'The string was not recognized as a valid DateTime.' I verified the formats and seems to be proper. I used the following code,

<telerik:GridDateTimeColumn UniqueName="EventDate" DataField="Date" SortExpression="Date" DataFormatString="{0:MMMM, dd, yyyy HH:mm:ss}" DataType="System.DateTime">
                                                <HeaderStyle Wrap="False" Width="20%"></HeaderStyle>
                                                <ItemStyle Wrap="False" HorizontalAlign="Left" Width="20%"></ItemStyle>
                                                <FilterTemplate>
                                                    From
                                                    <telerik:RadDateTimePicker ID="FromOrderDatePicker" runat="server" Width="140px" ClientEvents-OnDateSelected="FromDateSelected" />
                                                        
                                                    To
                                                    <telerik:RadDateTimePicker ID="ToOrderDatePicker" runat="server" Width="140px" ClientEvents-OnDateSelected="ToDateSelected" />
                                                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                                        <script type="text/javascript">
                                                            function FromDateSelected(sender, args) {
                                                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                                var ToPicker = $find('<%# ((GridItem)Container).FindControl("ToOrderDatePicker").ClientID %>');

                                                                var fromDate = FormatSelectedDate(sender);
                                                                var toDate = FormatSelectedDate(ToPicker););

                                                                console.log(fromDate + " " + toDate);

                                                                tableView.filter("EventDate", fromDate + " " + toDate, "Between");

                                                            }
                                                            function ToDateSelected(sender, args) {
                                                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                                var FromPicker = $find('<%# ((GridItem)Container).FindControl("FromOrderDatePicker").ClientID %>');

                                                                var fromDate = FormatSelectedDate(FromPicker);
                                                                var toDate = FormatSelectedDate(sender);
                                                                
                                                                console.log(fromDate + " " + toDate);

                                                                tableView.filter("EventDate", fromDate + " " + toDate, "Between");
                                                            }
                                                            function FormatSelectedDate(picker) {
                                                                var date = picker.get_selectedDate();
                                                                var dateInput = picker.get_dateInput();

                                                                console.log("1 -> " + date + " " + dateInput);

                                                                var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, "M/dd/yyyy hh:mm:ss tt");
                                                                //var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());

                                                                return formattedDate;
                                                            }
                                                        </script>
                                                    </telerik:RadScriptBlock>
                                                </FilterTemplate>
                                            </telerik:GridDateTimeColumn>. 


I'm getting the following print for the from and to date,
"4/23/2014 12:00:00 AM     -       4/24/2014 12:00:00 AM "

Please help. I want to filter based on both date and time. 
 








Pavlina
Telerik team
 answered on 30 Apr 2014
2 answers
252 views
Hi,

We are using the Telerik 2013.1.417.40 version and use the RadDatePicker and timer all over the site, which renders fine on all the browser except on IE11.
On all the browsers it uses the inline style "display:inline-block" and take the default width of "100px". We did not specify any width for the control and any css class.

<telerik:RadDatePicker ID="DatePickerStart"  runat="server" Calendar-ClientEvents-OnDateClick="DateSelected" 
                                DateInput-ClientEvents-OnValueChanged="DateChanged"  >
       <DatePopupButton></DatePopupButton>
       </telerik:RadDatePicker>
       &nbsp;&nbsp;&nbsp;&nbsp;
       <telerik:RadTimePicker runat="server" id="TimePickerStart" TimeView-OnClientTimeSelected="TimeSelected" ></telerik:RadTimePicker>
                            
The above code renders the Date picker textbox and time picker text box on the same line for all the browsers. But on IE11 both the boxes taking more than 100pixels width and the time picker box renders on next line. When i looked at it on IE11 developer tools, datepicker div renders with inline style "display : inline", for other browsers it comes as "inline-block". Even i gave the custom css class for the RadDatePicker and Timercontrols to specify the "display" property. But Telerik control renders the Inline display property.  


Is there any fix for IE11 render issue? Please find the attached image for the how it renders it on chrome and IE11.









Rajkumar
Top achievements
Rank 1
 answered on 30 Apr 2014
2 answers
205 views
I try to vertcal align text and image in RadPanelBarItem. take a look on the attach image. Please show me how to do it.
Thanks
David
Top achievements
Rank 1
 answered on 30 Apr 2014
4 answers
316 views
Hi,

I want to delete selected item but in a particular way.
So, I created CommandItemTemplate with some Linbutton, especially DeleteButton with custom Command "DeleteSelected".

On my grid I had property to allow client select row:

<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>


I use event "ItemCommand" from serverside and it's correctly fired. But in this event, RadGrid.SelectedItems.Count is always 0.
if (e.CommandName == "DeleteSelected")
{
               if (RadGrid.SelectedItems.Count > 0)
               {
                    //Always 0
               }
}


Where am I wrong ?

Marin
Telerik team
 answered on 30 Apr 2014
1 answer
79 views
I am using a Rad Scheduler in Timeline view to view active "appointments" and I have bound controls to NumberOfSlots and SlotDuration. The problem is if I show 4 slots of 1 week each the headers only show the week start (ie 4/25). Is there a way to change the headers to be a little more intuitive, like... 4/25-5/1, 5/2-5/8, 5/9-5/15?
 
My second problem is with trying to create an advanced edit/insert template. I have a combobox inside of a radscheduler and I would like to add a second combobox that selects types (1,2,3,4) and filter the Names combobox based on whether the relational table has an entry of type X and Name Y.

<asp:SqlDataSource runat="server"
        ID="GrabScheduling"
        ConnectionString="<%$ ConnectionStrings:Server %>"
        SelectCommand="GetApt_By_ProjectID"
        SelectCommandType="StoredProcedure"
    >
        <SelectParameters>
            <asp:ControlParameter ControlID="ProjectStatus" Name="pstat" />
        </SelectParameters>
</asp:SqlDataSource>
<Tel:RadGrid runat="server" >
<Tel:RadScheduler runat="server" ID="RadScheduler1" DataSourceID="GrabScheduling"  StartInsertingInAdvancedForm="true" DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="CName" CustomAttributeNames="NameID">
    <AdvancedEditTemplate>
        <asp:SqlDataSource runat="server" ID="SelectAvailNames"
                                        ConnectionString="<%$ ConnectionStrings:Server%>"
                                        SelectCommand="Get_Name_Timeslot_Availability"
                                        SelectCommandType="StoredProcedure"
                                        >
                                        <SelectParameters>
                                            <asp:QueryStringParameter QueryStringField="PID" Name="PID" />
                                            <asp:ControlParameter ControlID="startDate" Name="Start" />
                                            <asp:ControlParameter ControlID="endDate" Name="End" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                  <Tel:RadComboBox
                                        runat="server"
                                        ID="NameMems"
                                        AllowCustomText="true"
                                        DataSourceID="SelectAvailNames"
                                        DataTextField="Name"
                                        DataValueField="ID"
                                        MarkFirstMatch="true"
                                        SelectedValue='<%# Bind("NameID")%>'
                                    >
                                        <ItemTemplate>
                                            <div<%# If(Eval("AlreadyScheduled"), " style=""background-color: pink;""", "")%>>
                                                <%# Eval("Name")%>
                                            </div>
                                        </ItemTemplate>
                                    </Tel:RadComboBox>
    </AdvancedEditTemplate>
 
</Tel:RadScheduler>


So.... Yeah! This is my first post and I really tried to solve these two before coming here. I really appreciate any help, thanks!
Boyan Dimitrov
Telerik team
 answered on 30 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?