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

Could any one provide a sample online page implementing rad grid with a detail table and custom paging. Both rad grid and detail table should have custom paging. I need an example with need data source event.  I would like to see the following things working:

1. Get pagination working in detail table

2. Ability to change the page size and read new page size value in Need data source event.

Any help is greatly appreciated. 

Thanks

Ramana

Kostadin
Telerik team
 answered on 08 Jun 2015
5 answers
255 views

Environment:

 ASP.NET 2.0 

Telerik Web 2010 Q3 (Telerik.Web.UI_2010_3_1317_Dev.msi)

 

The popup calendar on my RadDatepicker is not displaying properly in Chrome.  See attached image.  

The calendar works fine in IE.

 

 

Konstantin Dikov
Telerik team
 answered on 08 Jun 2015
7 answers
126 views

I have come across a problem with the editor when adding a table or using the table wizard over chrome browser.

We have recently upgraded the telerik controls from V 2013 to v2015.1.401. After upgrade new version that some functionality are messed up in chrome browser like Image and Tables resize functionality by dragging is not working. Please follow below points to reproduce the issue.

On the Editor page,

from Design view go to HTML view,switch back to Design view, add a table or use table wizard.
Then try to increase/decrease table size with mouse.That Mouse/cursor is not left that table position.

Please refer link : http://screencast.com/t/UMOa20tGyv

The above issue found on on telerik demo site as well.


Ianko
Telerik team
 answered on 08 Jun 2015
2 answers
343 views

I have RadAsyncUpload control defined as following:

the PostbackTriggers property works fine if I have clicked the button "btnSave",  but in some case I need to simulate the button click automatically, 

None of the following javascript or JQuery methods solved my problem , they fire the click event but the files collections is always empty

function SaveMeeting() {
           document.getElementById('ctl00_PageBody_btnSave').onclick();
           //$('.btnSave').focus();
           //$('.btnSave').click();
           //$('.btnSave').trigger('click');
       }

<telerik:RadAsyncUpload Font-Size="Medium" ID="RadAsyncUpload1" runat="server" OnClientFilesUploaded="OnClientFilesUploaded" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploading="OnClientFileUploading OnClientFileUploadFailed="OnClientFileUploadFailed" OnClientFileUploadRemoving="onClientFileUploadRemoving OnClientFileUploadRemoved="onClientFileUploadRemoved"MultipleFileSelection="Automatic" PostbackTriggers="btnSave" HttpHandlerUrl="~/UploadDocFileHandler.ashx"
 Height="16px"></telerik:RadAsyncUpload>     

Omar
Top achievements
Rank 1
 answered on 07 Jun 2015
1 answer
132 views

I am having an issue with using a RadTooltipManager on RadTreeView nodes here is related code - this sits inside a user control:

<asp:HiddenField runat="server" id ="ResourceToolTip"/>
                        <telerik:RadToolTipManager
                            ID="RadTooltipManager1"
                            runat="server"
                            AutoTooltipify="False"
                            Position="TopCenter"
                            EnableViewState="False"
                            OnAjaxUpdate="RadTooltipManager1_AjaxUpdate">
                        </telerik:RadToolTipManager>
                        <telerik:RadTreeView
                            runat="server"
                            ID="tvResourceKitBundles"
                            OnClientContextMenuShowing="onClientResourceTreeContextMenuShowing"
                            OnClientContextMenuItemClicking="onClientResourceTreeContextMenuItemClicking"
                            OnClientMouseOver="onNodeMouseOverResourceTree"
                            OnClientMouseOut="onNodeMouseOut"
                            OnClientNodeDragStart="onResourceKitDragStart"
                            OnClientNodeDropping="onNodeDropping"
                            OnContextMenuItemClick="tvResourceKitBundles_ContextMenuItemClick"
                            OnNodeEdit="tvResourceKitBundles_NodeEdit"
                            OnNodeDrop="tvResourceKitBundles_OnNodeDrop"
                            EnableDragAndDrop="True"
                            EnableDragAndDropBetweenNodes="true">
                            <ContextMenus>
                                <telerik:RadTreeViewContextMenu ID="tvResourceKitContextMenu" runat="server">
                                    <Items>
                                        <telerik:RadMenuItem Value="Rename" Text="Rename"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Edit" Text="Edit"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Delete" Text="Delete"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Add Hyperlink" Text="Add Hyperlink"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Alphabetize Resources" Text="Alphabetize Resources"></telerik:RadMenuItem>
                                        <telerik:RadMenuItem Value="Featured" Text="Make Final Output" Visible="False"></telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadTreeViewContextMenu>
                            </ContextMenus>
                        </telerik:RadTreeView> 

function onNodeMouseOverResourceTree(sender, args) {
            //gets the node upon mousing over the node
            currentNode = args.get_node();
            currentTree = "resourceTree";

            if (currentNode.get_level() == 1) {
                $get("<%=ResourceToolTip.ClientID%>").value = currentNode.get_value();
                showToolTip(sender._element);
            }
        }

        function showToolTip(element) {
            var tooltipManager = $find("<%=RadTooltipManager1.ClientID%>");
            //If the user hovers the image before the page has loaded, there is no manager created  
            if (!tooltipManager) return;
            //Find the tooltip for this element if it has been created   
            var tooltip = tooltipManager.getToolTipByElement(element);
            //Create a tooltip if no tooltip exists for such element  
            if (!tooltip) {
                tooltip = tooltipManager.createToolTip(element);
            }
            tooltip.show();
        }

 

 Code behind:

 //this gets called on page load

            foreach (var resource in resources)
            {
                //build new node
                var node = new RadTreeNode(resource.Title, resource.ResourceID.ToString());
                node.ImageUrl = "/ImageResize.aspx?img=" + resource.FileIcon + "&h=16&w=16";
                node.Attributes.Add("ResourceFileID", resource.ResourceFileID.ToString());
                node.Attributes["id"] = Guid.NewGuid().ToString();

                RadTooltipManager1.TargetControls.Add(node.Attributes["id"], node.Value, true);

                if (resource.IsFeatured)
                {
                    node.BackColor = ColorTranslator.FromHtml("#EE7026");
                }
                else
                {
                    node.BackColor = Color.White;
                }

                //add new node tree
                nodes.Add(node);

 

//and this is the ajax update

 

protected void RadTooltipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
        {
            try
            {
                var resource = new Resource(SQLData.GetDBInt(ResourceToolTip.Value));

                Label lbl = new Label();
                lbl.ID = "lblResourceToolTip";
                if (resource.ResourceFileID > 0)
                    lbl.Text = resource.ResourceFile.FileName;
                else
                {
                    lbl.Text = Path.GetFileName(resource.URLToFile);
                }

                e.UpdatePanel.ContentTemplateContainer.Controls.Add(lbl);
            }
            catch
            {
            }
        }

 

 

So everything mostly works however when I quickly hover over a list of nodes it will start firing invalid viewstate errors - though it seems generally to continue to work - any way "I can avoid these viewstate errors? I'm thinking it's just firing too many ajax postbacks too fast when you run your mouse over multiple nodes at once - I've considered switching to the web service method for doing this but figured I'd see if there was a simple solution. Also, I don't necessarily need this to be dynamic but when I tried to use the tooltipify set to true and load each node.tooltip value on page load it does not work for me. Thanks

Adriaan
Top achievements
Rank 1
 answered on 05 Jun 2015
1 answer
100 views

Hi,

Based on appointment type, I need to display the appointments in different colors.

My "GetAppointments" method looks like this:

Public Overrides Function GetAppointments(ByVal p_oSchedulerInfo As ISchedulerInfo) As IEnumerable(Of Appointment)
    Dim l_oScheduleInfo = TryCast(p_oSchedulerInfo, wsScheduleInfo)
    Dim l_sScheduleIDs As String = l_oScheduleInfo.ScheduleIDs
 
    Dim l_aAppointments As New List(Of Appointment)()
 
    Using l_oDP As New wsDataProvider
        Using l_oSystem As New wsSystemGeneral(l_oDP)
            Dim l_sSql As String = "select * from `PlanningTaskBlocks` where `numScheduleID` in (" & l_sScheduleIDs & ") order by `numTaskID` asc"
            Using l_oDR As IDataReader = l_oDP.ExecuteReader(l_sSql)
                If l_oDR IsNot Nothing Then
                    Dim l_oAppointment As Appointment = Nothing, l_iTaskID As Long = 0
                    Dim l_sTask As String = Nothing, l_sColor As String = Nothing, l_iAgeMin As Integer = 18, l_iAgeMax As Integer = 99, l_sGender As String = "X"
                    While l_oDR.Read
                        If l_iTaskID <> l_oDR("numTaskID") Then
                            Using l_oDRtask As IDataReader = l_oDP.ExecuteReader("select * from `PlanningTasks` where `ID` = " & l_oDR("numTaskID") & " limit 1")
                                If l_oDRtask IsNot Nothing Then
                                    If l_oDRtask.Read Then
                                        l_sTask = l_oDRtask("txtName")
                                        l_sColor = l_oDRtask("txtColor")
                                        l_iAgeMin = l_oDRtask("numAgeMin")
                                        l_iAgeMax = l_oDRtask("numAgeMax")
                                        l_sGender = l_oDRtask("txtGender")
                                    End If
                                    If Not l_oDRtask.IsClosed Then l_oDRtask.Close()
                                End If
                            End Using
                            l_iTaskID = l_oDR("numTaskID")
                        End If
 
                        l_oAppointment = New Appointment
                        l_oAppointment.ID = l_oDR("ID")
                        l_oAppointment.Subject = Convert.ToString(l_sTask)
                        l_oAppointment.Start = DateTime.SpecifyKind(Convert.ToDateTime(l_oDR("dateStart")), DateTimeKind.Utc)
                        l_oAppointment.[End] = DateTime.SpecifyKind(Convert.ToDateTime(l_oDR("dateEnd")), DateTimeKind.Utc)
                        l_oAppointment.BackColor = System.Drawing.ColorTranslator.FromHtml(l_sColor)
 
                        l_oAppointment.Attributes("TaskID") = Convert.ToString(l_oDR("numTaskID"))
                        l_oAppointment.Attributes("TaskPoints") = Convert.ToString(l_oDR("numTaskPoints"))
                        l_oAppointment.Attributes("NumberOfPlaces") = Convert.ToString(l_oDR("numNumberOfPlaces"))
                        l_oAppointment.Attributes("AgeMin") = Convert.ToString(l_iAgeMin)
                        l_oAppointment.Attributes("AgeMax") = Convert.ToString(l_iAgeMax)
                        l_oAppointment.Attributes("Gender") = Convert.ToString(l_sGender)
 
                        'LoadResources(l_oAppointment)
                        l_aAppointments.Add(l_oAppointment)
                    End While
                    If Not l_oDR.IsClosed Then l_oDR.Close()
                End If
            End Using
        End Using
    End Using
 
    Return l_aAppointments
End Function
 

As you can see, I'm setting the BackColor property on every Appointment instance.

However, the Appointment.BackColor property is ignored and all appointsments are displayed with the same color in the RadScheduler. 

What do I need to do to 'push' my custom colors through the webservice to the scheduler?

 

Marja
Top achievements
Rank 1
 answered on 05 Jun 2015
2 answers
418 views

I have a radgrid in which I have added an image button to the header in the code behind.  Here is where I am adding the button:

protected void RadGridMain_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridHeaderItem)
            {
                GridHeaderItem headerItem = (GridHeaderItem)e.Item;
                GridTableView table = headerItem.OwnerTableView;
                GridColumn column = table.GetColumnSafe("AddTeamPositionColumn");
                if (column != null)
                {
                    ImageButton addTeam = new ImageButton();
                    addTeam.ID = "btnAddTeam";
                    addTeam.ImageUrl = "~/Images/Volunteer/AddPos.png";
                    addTeam.ToolTip = "Add new team";
                    headerItem["AddTeamPositionColumn"].Controls.Add(addTeam);
                    addTeam.CommandName = "initInsert";
                    headerItem.Style["vertical-align"] = "middle";
                }
            }
        }

This works fine, but in firefox and chrome the button appears at the very bottom of the header with blank space above it (pls see attached images).  It looks fine in IE.  I have tried all sorts of things to effect the alignment and nothing has any effect at all.  Here is the html of the column:

<telerik:GridButtonColumn ButtonType="ImageButton" ItemStyle-Wrap="true" CommandName="addNestedItem" Text="Add new team position"
                    ImageUrl="~/Images/Volunteer/AddPos.png" ButtonCssClass="MyImageButton" UniqueName="AddTeamPositionColumn">
     <HeaderStyle Width="25px" VerticalAlign="Middle"></HeaderStyle>
     <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" CssClass="MyImageButton"></ItemStyle></telerik:GridButtonColumn>

 

Does anyone know what I can do to make the image button added in the code behind be centered?

Kevin
Top achievements
Rank 1
 answered on 05 Jun 2015
5 answers
266 views

Hi,

I understand that there is no RadLabel control? I have read (and used) some of the workarounds for using ASP:Label eg, using RadFormDecorator to style labels, Setting visibility in pre-render for multi-pages.

It just seems that every time I use an asp label I have trouble eg. my current problem is that ASP:Labels do not display on RadWizard Steps. 

 

I was wondering what the reason is for having no RadLabel as surely this is a basic control for you guys to create (compared to other more fancy controls)?

 

 

Rumen
Telerik team
 answered on 05 Jun 2015
1 answer
136 views

Hi,

 

I search a lot but I don't find a way to "disable" the click event on a legend of a chart. I don't want my user could click on the legend.

 

Could you please help me ?

 

Thank

Vessy
Telerik team
 answered on 05 Jun 2015
1 answer
288 views

Hello,

I have a tabstrip that is dynamically created based on values in a table in a database.  There are several child tabs as well (up to three levels).  When I click on a tab a web user control is dynamically loaded into the RadMultiPage.  One of these web user controls contains a RadGrid that has a button column.  When the user clicks this button I want to switch to a new tab and I'd like to do this from code-behind.  Is this possible?  If it is, how?

Thanks.

Ivan Danchev
Telerik team
 answered on 05 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?