Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views

Hello,

I have created an application that uses the TabStrip.  My application has a Master Page that loads the ASPX page containing the TabStrip.  I have  a RadScriptManager and a RadAjaxManager (EnableAJAX is set to 'true') in my MasterPage.  I've set the "EnableHistory" to "true" for the RadScriptManager, and when the user clicks on a Tab, within the TabClick event, I add a HistoryPoint that stores the Tab's "text" value.  Withing the "OnNavigate" event for the RadScriptManager I can find the TabStrip and MultiPage controls, and I can find the Tab from it's text.  However, when I set the "selected" property of the tab to 'true' nothing happens.  The tab does not get loaded.  What am I doing wrong?  Is there a better way to achieve browser's "Back-button" navigation for the TabStrip that's been ajaxified?

Sample Code:

OnNavigate event for the RadScriptManager:

protected void rsmSiteMaster_Navigate(object sender, HistoryEventArgs e)
{
    string backPage = Server.HtmlEncode(e.State["BackNavigation"]);
 
    ContentPlaceHolder cphTabStrip = (ContentPlaceHolder)Page.Master.FindControl("cphTabStrip");
    RadAjaxLoadingPanel alpTabStrip = (RadAjaxLoadingPanel)Page.Master.FindControl("alpTabStrip");
    RadTabStrip rtabstripTabs = (RadTabStrip)cphTabStrip.FindControl("rtabstripTabs");
    RadMultiPage rmpTabStrip = (RadMultiPage)cphTabStrip.FindControl("rmpTabStrip");
    RadTab tab = rtabstripTabs.FindTabByText(backPage);
    tab.Selected = true;
    tab.DataBind();
 
}

 

This is how I set the HistoryPoint withing the "TabClick" event:

string key = "BackNavigation";
RadScriptManager.GetCurrent(this).AddHistoryPoint(key, e.Tab.Text);

 

Thanks,

Shawn A.

Ivan Danchev
Telerik team
 answered on 12 May 2016
1 answer
199 views
I am using the RadHtmlChart control. I have set the X axis title, as shown below. But in addition to that, I want each column to have its own title or label on the X axis. Is that possible? I can see that the RadHtmlChart control supports 2 Y axes, but it does not appear to support 2 X axes. If it did, I could use the second X axis to display the additional axis labels.
Frank
Top achievements
Rank 1
 answered on 12 May 2016
1 answer
152 views

Hi Team,

I've two questions.

 1) I'm trying to create a radgrid header with multiple columns grouped under a column,similar like below link.

http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/multi-column-headers/defaultcs.aspx

 

  <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Product Details" Name="ProductDetails" HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>

  </ColumnGroups>

I'm getting this below error. I'm using Ajax controls Telerik.Web.UI, v.2011.3.1305.40 (Dev), do this version of telerik controls supports this feature or not?

 

Please suggest some alternative approach.

Type 'Telerik.Web.UI.GridTableView' does not have a public property named 'ColumnGroups'.

2) An alternative for that in Header template I designed a HTML table.

 <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderStyle-Width="250px" AllowFiltering="false" >
                    
                    <HeaderTemplate>
                    <table>
                    <tr>
                    <td colspan="8" style="text-align:center;> 
                        <asp:Label ID="Label10" runat="server" Text=" Unweighted Savings" ></asp:Label>                   
                    </td>                   
                    </tr>
                    <tr>
                    <td>
                    <asp:LinkButton ID="LinkButton2" runat="server" Text=" C&S "   CommandName='Sort' CommandArgument='CS' Font-Underline="true"></asp:LinkButton>                 
                    </td>
                    <td>
                        <asp:LinkButton ID="LinkButton1" runat="server" Text=" M&R "   CommandName='Sort' CommandArgument='MR' Font-Underline="true"></asp:LinkButton>
                    </td>
                    <td>
                        <asp:LinkButton ID="LinkButton3" runat="server" Text=" E&I "  CommandName='Sort' CommandArgument='EI' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton4" runat="server" Text=" Public Exchange "  CommandName='Sort' CommandArgument='Exchange' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton5" runat="server" Text=" Private Exchange "   CommandName='Sort' CommandArgument='PrivateExchange' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton6" runat="server" Text=" Total "   CommandName='Sort' CommandArgument='Total' Font-Underline="true"></asp:LinkButton>
                    </td>
                    </tr>
                    </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                    <table>
                    <tr>
                    <td>
                    <asp:Label ID="Label4" Text='<%# Bind("CS") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label5" Text='<%# Bind("MR") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label6" Text='<%# Bind("EI") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label7" Text='<%# Bind("Exchange") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label8" Text='<%# Bind("PrivateExchange") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label9" Text='<%# Bind("Total") %>' runat="server" ></asp:Label>
                    </td>
                    </tr>
                    </table>
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>

 

I'm getting my desired output, but when i sort any column , entire column is not highlighted and up/down arrow is not coming.

Unable to filter these columns. inside header template.

Regards

Sai Teja

Viktor Tachev
Telerik team
 answered on 12 May 2016
4 answers
148 views
I'm trying to set up a download link button, but it seems impossible. I keep getting the following error:

InnerException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary'

FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method
: System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal
StackTrace
:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary' ---> System.InvalidOperationException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary' at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input) at Telerik.Web.UI.GridCommandEventArgsFactory.CreateGridCommandEventArgs(GridItem item, Object commandSource, CommandEventArgs originalArgs) at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

This is from DotNetNuke's Log Viewer. I have a user control with a RadGrid that contains the RadButton(s) I'm using to make the download links. This control is loaded in various places that wrap the control with an RadAjaxPanel. Even when I switch it to a Panel ajaxified by a RadAjaxManager this issue appears. What does this error mean? I have no means of debugging it.
Konstantin Dikov
Telerik team
 answered on 12 May 2016
1 answer
83 views

I populate a Dataset whith multiple data tables of results, and then I loop through each of the tables to reveal my results.

 

However only the first datatable is used the others are ignored.

 

I have made sure that the lineseries name is the same as the datatable ?

 

Any ideas please ??

 

 

 

foreach (DataTable table in myRunData.Tables)
            {
              
                LineSeries currentLine = new LineSeries();
                lineSeries1.Name = table.TableName;
                lineSeries1.LabelsAppearance.Visible = true;
                lineSeries1.LabelsAppearance.DataFormatString = "y";

                lineSeries1.TooltipsAppearance.Color = System.Drawing.Color.Blue;
                lineSeries1.TooltipsAppearance.DataFormatString = "{0}";

                lineSeries1.DataFieldY = "TimeInSeconds";

                lineSeries1.TooltipsAppearance.ClientTemplate = " #= kendo.parseInt(value/60) #:#= (value%60) # minutes";
                lineSeries1.LabelsAppearance.ClientTemplate = " #= kendo.parseInt(value/60) #:#= (value%60) # minutes";

                lineSeries1.TooltipsAppearance.DataFormatString = "{0:hh:MM:ss}";
                RadHtmlChart1.PlotArea.Series.Add(lineSeries1);
            }
            RadHtmlChart1.DataSource = parkRunData;
            RadHtmlChart1.DataBind();
            if (!RadHtmlChart1.Visible)
            {
                RadHtmlChart1.Visible = true;
            }

Marin Bratanov
Telerik team
 answered on 12 May 2016
1 answer
170 views

I have a line graph
The Y axis are time in seconds.

 

What I want is the legend for each point to be time not seconds

 

lineSeries1.TooltipsAppearance.DataFormatString = "{0}";

its just coming up with numbers though :(
also is there any way of formatting the Y axis, so that instead of seconds I get
5:00 10:00 15:00 20:00 25:00
etc ? which relates to
500 seconds 1000 seconds 1500 seconds 2000 seconds
etc
The data is fed in using a datatable in code behind so dont really want to hard code the times as they could be very variable.
foreach (DataRow row in dt.Rows){CategorySeriesItem item1 = new CategorySeriesItem(); item1.Y = int.Parse(row["TimeInSeconds"].ToString()); lineSeries1.SeriesItems.Add(item1);}
This draws the point, but what I want to be able to do is set the legends and labels for the time

Marin Bratanov
Telerik team
 answered on 12 May 2016
3 answers
65 views

So I'm using the RadScheduler control with WebApi and my appointment records come back from the server as iso 8601 strings like "2016-03-01T04:00:00Z". All dates that come from the server are in UTC format, and the RadScheduler control is set to render appointments using UTC time. So essentially if an appointment comes from the server as 8am UTC, then it should render at 8am on the scheduler, regardless of what timezone the client computer is set to.

Now there's an edge case that breaks the rendering of appointments. During the first X hours of the first day of a month, if an appointment starts within the first X hours, the parsing for the start time string fails and the appointment does not show up on the scheduler. The value X is the absolute value of the timezone offset for the client machine. So for instance if the machine is set to -5 hours offset, then appointments within the first 5 hours will not show up.

I've narrowed down the problem to the fact that the Telerik.Web.UI.Scheduler.Rendering.parseISO8601 function does not return a valid Date object in this scenario. You should be able to replicate this easily by executing Telerik.Web.UI.Scheduler.Rendering.parseISO8601("2016-03-01T04:00:00Z") assuming you have the Telerik.Web.UI.Scheduler.Rendering namespace / class loaded. It will return an invalid date if the client timezone offset is -5 or greater (-6, -7, etc..).

Is this a known issue and is there a fix?

Plamen
Telerik team
 answered on 12 May 2016
1 answer
133 views

Hello experts... I need help please.

I have a RadGrid with multiple row edit... I want to open all checked Items in a popup when I click the edit button.

I thought I do it with <NestedViewTemplate> or with another RadGrid2. I have no idea about how do I solve this problem. Can you please give me feedback.

Here is my short code:

<telerik:RadGrid ID="myGrid" Skin="Silk" AutoGenerateColumns="false" AllowAutomaticUpdates="true"
OnNeedDataSource="myGrid_NeedDataSource" AllowPaging="True" PageSize="10" AllowMultiRowSelection="True" AllowMultiRowEdit="True"
ShowStatusBar="true" AllowFilteringByColumn="true" runat="server">    
        <MasterTableView DataKeyNames="Title" Name="myGridView" EnableHeaderContextMenu="true" ItemStyle-Wrap="False" CommandItemDisplay="Top" Width="100%" >
            <Columns>
            <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="false" HeaderStyle-Width="2%" >
                      <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="ToggleRowSelection"
                          AutoPostBack="True" />
                      </ItemTemplate>
                      <HeaderTemplate>
                        <asp:CheckBox ID="headerChkbox" runat="server" OnCheckedChanged="ToggleSelectedState"
                          AutoPostBack="True" />
                      </HeaderTemplate>
             </telerik:GridTemplateColumn>   
                
            <telerik:GridBoundColumn UniqueName="Title" DataField="Title" HeaderText="Title" HeaderStyle-Width="15%" FilterControlAltText="Title" ReadOnly="true">
                <FilterTemplate>
                    <telerik:RadComboBox ID="RadComboBox1" runat="server" Height="200px" Width="100%"                      
                     AllowCustomText="true" AutoPostBack="true" EnableLoadOnDemand="true" MarkFirstMatch="true"
                     DataValueField="Id" DataTextField="Title" OnSelectedIndexChanged="RadComboBox1_IndexChanged"
                     CheckBoxes="true" AppendDataBoundItems="true" EmptyMessage="Select..." CheckedItemsTexts="DisplayAllInInput"
                      SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Title").CurrentFilterValue %>' >                      
                    </telerik:RadComboBox>                         
                </FilterTemplate>
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Price" HeaderText="Price" HeaderStyle-Width="65%" AllowFiltering="false">
            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn DataField="Order" HeaderText="Order" AllowFiltering="false">
            </telerik:GridBoundColumn>
        </Columns>             
            <NestedViewTemplate>
                <telerik:RadGrid RenderMode="Lightweight" runat="server" ID="editGrid" ShowFooter="true"
                                AllowSorting="false" EnableLinqExpressions="false">
                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true"
                                    DataKeyNames="Title" PageSize="7" HierarchyLoadMode="ServerOnDemand">
                                    <DetailTables>
                                        <telerik:GridTableView Name="editView" AutoGenerateColumns="false" DataKeyNames="Title" DataSourceID="Title"
                                            Width="100%" CommandItemSettings-ShowRefreshButton="false" >                                            
                                            <Columns>
                                                <telerik:GridBoundColumn SortExpression="Price" HeaderText="Price" HeaderButtonType="TextButton"
                                                    DataField="Price" UniqueName="Price">
                                                </telerik:GridBoundColumn>                                                
                                                <telerik:GridBoundColumn SortExpression="Order" HeaderText="Order" HeaderButtonType="TextButton"
                                                    DataField="Order" UniqueName="Order">
                                                </telerik:GridBoundColumn>                                             
                                            </Columns>
                                           <%-- <SortExpressions>
                                                <telerik:GridSortExpression FieldName="Title" SortOrder="Descending"></telerik:GridSortExpression>
                                            </SortExpressions>--%>
                                        </telerik:GridTableView>
                                    </DetailTables>                                    
                                </MasterTableView>
                                <ClientSettings AllowDragToGroup="true">
                                    <Scrolling AllowScroll="true" ScrollHeight="" />
                                </ClientSettings>
                                <PagerStyle PageButtonCount="3" Mode="NextPrevAndNumeric" ShowPagerText="false" />
                            </telerik:RadGrid>
             </NestedViewTemplate>
        <CommandItemTemplate>
           <asp:LinkButton Style="vertical-align: bottom" ID="btnEditSelected" runat="server" OnClick="EditSelected_Click" CommandName="EditSelected" Visible='<%# myGrid.EditIndexes.Count == 0 %>'><img style="border:0px" alt="" src="/_layouts/images/Telerik/Edit.png" /> Edit Selected</asp:LinkButton>&nbsp;&nbsp;       
           <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# myGrid.EditIndexes.Count > 0 %>'><img style="border:0px" alt="" src="/_layouts/images/Telerik/Update.png" /> Update Items</asp:LinkButton>&nbsp;&nbsp;
           <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# myGrid.EditIndexes.Count > 0 || myGrid.MasterTableView.IsItemInserted %>'><img style="border:0px" alt="" src="/_layouts/images/Telerik/Cancel.png" /> Cancel editing</asp:LinkButton>&nbsp;&nbsp;                   
           <asp:LinkButton ID="LinkButton6" runat="server" CommandName="RebindGrid"><img style="border:0px" alt="" src="/_layouts/images/Telerik/Refresh.png" /> Refresh table</asp:LinkButton>&nbsp;&nbsp;
               <br />
         </CommandItemTemplate>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true" ClientEvents-OnPopUpShowing="PopUpShowing" >
        <Selecting AllowRowSelect="True" EnableDragToSelectRows="True"></Selecting>
    </ClientSettings>
</telerik:RadGrid>

 

 

private void EditSelected_Click(object sender, EventArgs e)
{

????

}

 

when I checked Items it shold come the checked Items in Popup and edit.

 

I would be glad about your help.

Thanks a lot.

 

 

 

 

Maria Ilieva
Telerik team
 answered on 12 May 2016
9 answers
549 views
Hi

I have used OnPupupOpening of RadDatePicker. It's working proper but Calendar does not get pop up. 

My code is 
<telerik:RadDatePicker ID="FromDatePicker" runat="server" Culture="English (United States)">
                                                                                <ClientEvents OnPopupOpening="OnPopupOpening" ></ClientEvents>
                                                                                <dateinput >
                                                                                </dateinput>
                                                                                <calendar showrowheaders="False"
                                                                                    usecolumnheadersasselectors="False" userowheadersasselectors="False"
                                                                                    viewselectortext="x">
                                                                                </calendar>
                                                                                <datepopupbutton />
                                                                            </telerik:RadDatePicker>
<script language="javascript" type="text/javascript">
function OnPopupOpening(sender, args) {
    GetValue();
    }
</script>

here, GetValue() is called properly but i am not able see calendar.

Thanks
Kamini
Maria Ilieva
Telerik team
 answered on 12 May 2016
2 answers
57 views

I'm looking for a way to prevent a task from becoming a summary (by adding tasks, or moving/dropping tasks, as children) if certain conditions exist on that task.  For instance, if a task has had time reported against it, it cannot become a summary.

Can I prevent all the CRUD operations on the Gantt based on checking for a condition on the task that would become a summary?  Can I return the data to check as part of the Gantt query? Or would this have to be outside the control?

Thanks for any help or hints

Ivan Danchev
Telerik team
 answered on 12 May 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?