Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
55 views
hi,
Do we have something like CollapseImageURL, ExpandImageURL etc as we have in ASP.Net Treeview. If not can we replace +/- with custom image in NodeBound function of a RADTreeView?
Kate
Telerik team
 answered on 06 Feb 2012
2 answers
108 views
I have a custom skin, and cannot seem to get my custom arrows to show. I'd like bigger arrows for people browsing on touch devices.  Is this possible?  I tried amending the background-position values in the skin css, but to no avail.  Currently, the images used seem to be coming from a fixed place in the sprite image, but not where I'm trying to point in the css.

NB: Even though this the RadTabStrip has ScrollChildren set to true, the tabs wrap in IE9 and Chrome, though never in Firefox (all Win7).  Note that sometimes the tab strip becomes a single line strip as I remove and add tabs.

Any help would be welcome.

See an example at http://an.rsl.wustl.edu/radcontrolswebapp1/default.aspx

Here is part of my custom skin css (named "an12")
.RadTabStrip_an12 .rtsLI,
.RadTabStrip_an12 .rtsLink
{
    color: #000;
    font: 12px/26px "Segoe UI", Arial, sans-serif;
}
 
.RadTabStripLeft_an12 .rtsSeparator,
.RadTabStripRight_an12 .rtsSeparator
{
    background: #828282;
}
 
/* <disabled tabs> */
.RadTabStrip_an12 .rtsDisabled
{
    color: #aaa;
}
/* </disabled tabs> */
 
/* <scrolling arrows> */
.RadTabStrip_an12 .rtsNextArrow,
.RadTabStrip_an12 .rtsPrevArrow,
.RadTabStrip_an12 .rtsPrevArrowDisabled,
.RadTabStrip_an12 .rtsNextArrowDisabled
{
    background-image: url('TabStrip/TabStripStates.png');
    height:48px;
    width:32px;
}
 
.RadTabStrip_an12 .RadTabStripTop_an12 .rtsNextArrow { background-position: 0 -288px; }
.RadTabStrip_an12 .RadTabStripTop_an12 .rtsPrevArrow { background-position: -32px -288px; }
.RadTabStrip_an12 .RadTabStripTop_an12 .rtsPrevArrowDisabled{ background-position: -64px -288px; }
.RadTabStrip_an12 .RadTabStripTop_an12 .rtsNextArrowDisabled{ background-position: -96px -288px; }
 
/* </scrolling arrows> */
Tom
Top achievements
Rank 1
 answered on 06 Feb 2012
1 answer
70 views
I have a control which is an html table of links.  We turn off various rows in this table based on user permissions and/or the state of the data.  Need help with getting the control to render after we use a RadWindow.

I think I'm pretty close.  There are two links which are kind of the on-and-off for this function.  Clicking whichever link is showing pops up a RadWindow; if the user hits the 'right' button, we want to make that link invisible and show its opposite number.

I've got the client-side handling of the RadWindow closing working, which kicks off an ajaxrequest as such:
$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest('ShowRDDAssignmentRow');

I've got the handler in my code-behind properly looking at the parameter and setting each table row's visibility properly.  I can't figure out how to configure the RadAjaxManagerProxy to recognize this request and tell the control it's been updated.

I've tried setting the AjaxControlID to the link, the Proxy, and even manually in code-behind to the Manager (this being a control, of course that's not local), but I can't get the table to re-draw.  I've got a RadAjaxPanel enclosing my html table, and that panel is the updated control, so my markup is like this:
<telerik:RadAjaxLoadingPanel ID="loadingPanel" Skin="Default" runat="server" />
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManagerProxy">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ajaxPanel" LoadingPanelID="loadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

Seems as if I'm missing something obvious.

Thanks,

Scott
golddog
Top achievements
Rank 1
 answered on 06 Feb 2012
1 answer
167 views
When I use the RadInputManager on a control declared as:

            <asp:TextBox ID="cname2" runat="Server" class="MyClass" Width="250px"></asp:TextBox>

I get the following :

            <input name="cname2" type="text" id="cname2" class="RadInputMgr RadInputMgr_Office2010Blue RadInput_Enabled_Office2010Blue" class="MyClass" onmouseover="javascript:$radIE.mouseOver(event);" onmouseout="javascript:$radIE.mouseOut(event);" onkeypress="javascript:$radIE.keyPress(event);" onblur="javascript:$radIE.blur(event);" onfocus="javascript:$radIE.focus(event);" onkeyup="javascript:$radIE.keyUp(event);" style="width:250px;" />

instead of

            <input name="cname2" type="text" id="cname2" class="RadInputMgr RadInputMgr_Office2010Blue RadInput_Enabled_Office2010Blue MyClass"  onmouseover="javascript:$radIE.mouseOver(event);" onmouseout="javascript:$radIE.mouseOut(event);" onkeypress="javascript:$radIE.keyPress(event);" onblur="javascript:$radIE.blur(event);" onfocus="javascript:$radIE.focus(event);" onkeyup="javascript:$radIE.keyUp(event);" style="width:250px;" />

Having two class attributes in the html is causing problems with JQuery code like $(this).attr('class') since only the first class attribute is returned.

Is there a way to get the RadInputManager to concatenate the class attributes instead of creating a new class attribute on the element?
Vasil
Telerik team
 answered on 06 Feb 2012
3 answers
166 views

I am not sure if my goal is possible with the current design of the RadGrid.

Goal:
To have a RadGrid setup so that the first 2 columns are frozen, and the remaining columns are reorderable and use the reorder animation.

Attempt 1:
Good - I can not start a drag on the first 2 columns
Bad - I can drag one of the AutoGenerated columns over the first 2 column spots and the animation shows the reorder
Good - When dropping over one of the first two columns it will revert back and not actually do the reorder.
...

<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder"

Animation-AllowColumnReorderAnimation="true" Animation-AllowColumnRevertAnimation="true">

</ClientSettings>

<MasterTableView>

<Columns>

<telerik:GridTemplateColumn Reorderable="false"><ItemTemplate>One</ItemTemplate></telerik:GridTemplateColumn>

<telerik:GridTemplateColumn Reorderable="false"><ItemTemplate>Two</ItemTemplate></telerik:GridTemplateColumn>
...AutoGenerated Columns Here

</Columns>

</MasterTableView>

...

 

Attempt 2:
Good - I can not start a drag on the first 2 columns
Good - I can not drag one of the AutoGenerated columns over the first 2 column spots
Bad - The reorder animation is not working in this case
...

<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" ColumnsReorderMethod="Reorder"

     Animation-AllowColumnReorderAnimation="true" Animation-AllowColumnRevertAnimation="true"
    Scrolling-AutoScroll="true" Scrolling-FrozenColumnsCount
="2" 
    Scrolling-UseStaticHeaders="true" Scrolling-SaveScrollPosition="true">

</ClientSettings>

<MasterTableView>

<Columns>

<telerik:GridTemplateColumn Reorderable="false"><ItemTemplate>One</ItemTemplate></telerik:GridTemplateColumn>

<telerik:GridTemplateColumn Reorderable="false"><ItemTemplate>Two</ItemTemplate></telerik:GridTemplateColumn>
...AutoGenerated Columns Here

</Columns>

</MasterTableView>

...

 

Any advice or ideas are greatly appreciated.
Thanks!
-Dan

Andrey
Telerik team
 answered on 06 Feb 2012
1 answer
136 views

The loading panel shows the first time.

HttpAnalyzer first time:

     
        <table id="ctl39_RadioButtonList_Goal" class="radiobuttonlist-default" border="0" style="width:100%;">
        <tr>
            <td><input id="ctl39_RadioButtonList_Goal_0" type="radio" name="ctl39$RadioButtonList_Goal" value="0" checked="checked" /><label for="ctl39_RadioButtonList_Goal_0">Трудоустройство</label></td>
        </tr><tr>
            <td><input id="ctl39_RadioButtonList_Goal_1" type="radio" name="ctl39$RadioButtonList_Goal" value="1" onclick="javascript:setTimeout('__doPostBack(\'ctl39$RadioButtonList_Goal$1\',\'\')', 0)" /><label for="ctl39_RadioButtonList_Goal_1">Практика</label></td>
        </tr>
    </table>
     
</div>|61|updatePanel|ctl39_radAjaxManagerSU|<span id="ctl39_radAjaxManager" style="display:none;"></span>|0|hiddenField|__EVENTTARGET||0|hiddenField|__EVENTARGUMENT||0|hiddenField|__LASTFOCUS||1716|hiddenField|__VIEWSTATE|/wEPDwUJNzY4NzI0NDkwD2QWAmYPZBYEAgEPZBYCZg9kFgJmD2QWAmYPFgIeC18hSXRlbUNvdW50AgIWBGYPZBYCZg8VAizQkNC90LrQtdGC0LAg0LrQsNC90LTQuNC00LDRgtCwINC+0L3Qu9Cw0LnQvQMgLSBkAgEPZBYCZg8VAhsi0J/RgNC40L7RgNCx0LDQvdC6IiDQntCQ0J4AZAIDD2QWBmYPDxYCHgdWaXNpYmxlaGQWAgICD2QWBAIDDxBkEBUJBUJsYW5rB0RlZmF1bHQQcnNmIGFkdiBjYXJvdXNlbApyc2YgYmFubmVyC3JzZiBkZWZhdWx0CHJzZiBsZWZ0DHJzZ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9kFgIfBgUNdGFiU2ltcGxlVGV4dGQCBQ8UKwACZBUCClBhZ2VWaWV3XzEKUGFnZVZpZXdfMhYCZg9kFgICAQ88KwAWABYCZg8PFgIeBFNraW4FB0RlZmF1bHRkFgJmDw8WBB4VU2hvd0NvbnRlbnREdXJpbmdMb2FkaB4ORGVzdHJveU9uQ2xvc2VoZGQCigEPZBYCAgEPDxYCHhdFbmFibGVBamF4U2tpblJlbmRlcmluZ2hkZAKqAQ8PFgIfAwJJZBYCAgEPZBYCAgEPEGRkFgBkAocCDw8WAh8DAlNkFgICAQ9kFgICAQ8QZGQWAGRk|76|hiddenField|__EVENTVALIDATION|/wEWCQLuqZKrCQLtypk7AvLKmTsC/aWz1QwC65yXTQLVmKOhAQKqz5nVBgK8he+tAgKuvtzaBQ==|0|asyncPostBackControlIDs|||0|postBackControlIDs|||52|updatePanelIDs||tctl39$ctl39$PanelStartPanel,tctl39$radAjaxManagerSU|0|childUpdatePanelIDs|||50|panelsToRefreshIDs||ctl39$ctl39$PanelStartPanel,ctl39$radAjaxManagerSU|2|asyncPostBackTimeout||90|52|formAction||default.aspx?item=r%2fabout%2fvacancy%2fanketaonline|

HTTPAnalyzer second:
656|updatePanel|ctl39_ctl39_PanelStartPanel|<div id="ctl39_PanelStart">
     
        <table id="ctl39_RadioButtonList_Goal" class="radiobuttonlist-default" border="0" style="width:100%;">
        <tr>
            <td><input id="ctl39_RadioButtonList_Goal_0" type="radio" name="ctl39$RadioButtonList_Goal" value="0" checked="checked" /><label for="ctl39_RadioButtonList_Goal_0">Трудоустройство</label></td>
        </tr><tr>
            <td><input id="ctl39_RadioButtonList_Goal_1" type="radio" name="ctl39$RadioButtonList_Goal" value="1" onclick="javascript:setTimeout('__doPostBack(\'ctl39$RadioButtonList_Goal$1\',\'\')', 0)" /><label for="ctl39_RadioButtonList_Goal_1">Практика</label></td>
        </tr>
    </table>
     
</div>|0|hiddenField|__EVENTTARGET||0|hiddenField|__EVENTARGUMENT||0|hiddenField|__LAST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CVQ9kFgJmD2QWAgIDDw9kFgIeCkVkaXRvck1vZGUFBUZhbHNlFgJmD2QWAmYPZBYEAgEPFCsAAhQrAAIPFgIeC18hRGF0YUJvdW5kZ2QQFgJmAgEWAhQrAAIPZBYCHgJJRAUJdGFiRWRpdG9yZBQrAAIPZBYCHwYFDXRhYlNpbXBsZVRleHRkDxYCZmYWAQVuVGVsZXJpay5XZWIuVUkuUmFkVGFiLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDEwLjEuNDE1LjM1LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDRkFgRmDw9kFgIfBgUJdGFiRWRpdG9yZAIBDw9kFgIfBgUNdGFiU2ltcGxlVGV4dGQCBQ8UKwACZBUCClBhZ2VWaWV3XzEKUGFnZVZpZXdfMhYCZg9kFgICAQ88KwAWABYCZg8PFgIeBFNraW4FB0RlZmF1bHRkFgJmDw8WBB4VU2hvd0NvbnRlbnREdXJpbmdMb2FkaB4ORGVzdHJveU9uQ2xvc2VoZGQCigEPZBYCAgEPDxYCHhdFbmFibGVBamF4U2tpblJlbmRlcmluZ2hkZAKqAQ8PFgIfAwJJZBYCAgEPZBYCAgEPEGRkFgBkAocCDw8WAh8DAlNkFgICAQ9kFgICAQ8QZGQWAGRk|76|hiddenField|__EVENTVALIDATION|/wEWCQLuqZKrCQLtypk7AvLKmTsC/aWz1QwC65yXTQLVmKOhAQKqz5nVBgK8he+tAgKuvtzaBQ==|0|asyncPostBackControlIDs|||0|postBackControlIDs|||52|updatePanelIDs||tctl39$ctl39$PanelStartPanel,tctl39$radAjaxManagerSU|0|childUpdatePanelIDs|||27|panelsToRefreshIDs||ctl39$ctl39$PanelStartPanel|2|asyncPostBackTimeout||90|52|formAction||default.aspx?item=r%2fabout%2fvacancy%2fanketaonline|


<%@ Control Language="C#" Inherits="Test" CodeFile="Test.ascx.cs" %>

 
<telerik:RadAjaxLoadingPanel
    ID="LoadingPanel_1"
    runat="server"
    IsSticky="false"
    BackColor="#FFFFFF"
    Transparency="15"
    InitialDelayTime="0"
>
 
</telerik:RadAjaxLoadingPanel>
 
 
    <telerik:RadAjaxManager
        ID="radAjaxManager"
        runat="server"
        RequestQueueSize="50"
        RestoreOriginalRenderDelegate="True" EnableAJAX="True">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadioButtonList_Goal">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="PanelStart" LoadingPanelID="LoadingPanel_1" UpdatePanelRenderMode="Block" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <div class="ContentForm">
    <asp:Panel ID="PanelStart" runat="server" Visible="true">
        <asp:RadioButtonList
            id="RadioButtonList_Goal"
            runat="server"
            Width="100%"
            DataTextField="text"
            DataValueField="value"
            AutoPostBack="true"
            EnableViewState="False">
          
                <asp:ListItem Value="0">Трудоустройство</asp:ListItem>
                <asp:ListItem Value="1" Selected="True">Практика</asp:ListItem>
            </asp:RadioButtonList>
    </asp:Panel>
    </div>
using System;
using System.Data;
using System.Diagnostics;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Web.UI;
using RSDN;
using System.Net;
using Telerik.Web.UI;
using System.Collections.Generic;
using System.Collections;
 
using System.Xml.Linq;
 
 
 
namespace AnketaOnline
{
 
    public partial class Test : Feedback
    {
 
 
        /// <summary>
        /// portlet title
        /// </summary>
        public override string GetPortletTitle()
        {
            return
                " AnketaOnline, Анкета по трудоустройству онлайн";
        }
    }
}
Antonio Stoilkov
Telerik team
 answered on 06 Feb 2012
1 answer
117 views
Hello,

I'm building up a grid programmatically. I add GridItemColumns by setting their TemplateColumn and FilterColumn to classes that inherit from ITemplate. I'm currently working on adding a multiselect dropdown filter template. I'm able to get the control to display, I just need help getting the javascript function to work correctly. The function fires on the checkbox "Onclick" event. If I can figure out how to access the combo box from within this javascript function, I'll be fine. 

My class that inherits ITemplate, adds the onclick event to the checkbox. I've added the onclick function to the main calling page. When the user clicks the checkbox, it's fired. The comboId is the combobox "ClientID". How can I pass a reference to this javascript function and access the combo box?? Please note, the checkbox inside the comboboxitem is the control firing this event and it's the "chk" parameter below:

My Main Page which contains the grid control:
function onCheckBoxClick(chk, comboId) {
    var text = "", values = "";
 
    var combo = $find(comboId);
 
    if (combo != null) {
        alert('Found ComboBox');
 
        var items = combo.get_items();
        if (items != null) {
            alert('Found Items');
 
            alert('Num Items: ' + items.length);
        } else {
            alert('NOT Found Items');
        }
 
 
    } else {
        alert('NOT Found ComboBox');
    }

This is the "InstantiateIn" method for the "ItemTemplate" section of the combo box. 
public void InstantiateIn(Control container)
{
    chkBox = new CheckBox();
    chkBox.ID = string.Format("msChk_{0}", Column);
 
    RadComboBoxItem item = (container as RadComboBoxItem);
    RadComboBox box = (item.Owner as RadComboBox);
 
    string _onClick = "";
    _onClick = string.Format("onCheckBoxClick({0}, {1})", "this", box.ClientID.ToString());
 
    chkBox.Attributes.Add("onclick", _onClick);
    chkBox.Text = item.Text;
 
    container.Controls.Add(chkBox);
}





Thanks,
Nathan
Top achievements
Rank 2
 answered on 06 Feb 2012
1 answer
98 views
I found that the radupload gets translated into  a series of input tags.

the input type=file is just  chilling at  position: absolute; left: 0px; top: -5000px;  

this happens while the hover over is not fired.

The problem with this is that my page is rather large and -5000 px before the upload
is some checkbox

So when i click on the checkbox a File browse fires and i'm prompted to upload
a file instead of just checking the  current checkbox. 

Is there a fix for this?  I tried hiding the input but that renders the control useless.


Bozhidar
Telerik team
 answered on 06 Feb 2012
10 answers
405 views
Hi

I have a RadGrid with Master and Detail views.  The load mode for the details view is HierarchLoadMode="ServerOnDemand".  I am binding the details view on the RadGrid DetailTableDataBind event.

I am trying to set the value of one of the detail fields to a value from the master table view but can't figure out how to get a reference to the detail row/field  being bound. 

 

Thank you for your assistance

Tracy

Private Sub rgvDataExceptions_DetailTableDataBind(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles rgvDataExceptions.DetailTableDataBind
        Dim SelectedRow As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
        Dim intException As Int32 = SelectedRow.GetDataKeyValue("ExceptionID")
        Dim detailTable As GridTableView = DirectCast(SelectedRow.ChildItem.NestedTableViews(0), GridTableView)
        SQLDS_DataExceptionsMessage.SelectParameters.Clear()
        SQLDS_DataExceptionsMessage.SelectParameters.Add("intExceptionId", intException)
        e.DetailTableView.DataSource = SQLDS_DataExceptionsMessage
                  'Get value from master table row
        Dim strExceptionMessage As String = SelectedRow("ExceptionMessage").Text 

            I would then like to set the bltExceptionMessage,which is a bulled list that is in a template column of the details view

        
'Dim bltMessages As BulletedList = DirectCast(SelectedRow.FindControl("bltExceptionMessage"), BulletedList)
        'Dim aryMessages As New ArrayList
  
        'aryMessages.AddRange(Split(strExceptionMessage, "~"))
        'bltMessages.DataSource = aryMessages
        'bltMessages.DataBind()
  
  
    End Sub
 

 

Andrey
Telerik team
 answered on 06 Feb 2012
3 answers
330 views
I originally posted this as a reply to a year old post.

I have a RadWindowManager with DestroyOnClose='true' but on every postback, even after closing the window theRadWindowManager's Windows collection still contains the window. I do not have VisibleOnPageLoad set. Instead, on every load, I run the following javascript.

function openPromoteWindows(RadWindowManagerId) {
    var oManager = $find(RadWindowManagerId);
    var oWindows = oManager.GetWindows();
    for (i = 0; i < oWindows.length; i++) {
        var oWindow = oWindows[i];
        oWindow.show();
        oWindow.Minimize();
        oWindow.get_popupElement().style.zIndex = 10000 + i;
    }
}

This successfully opens all the windows minimized inside a taskbar. The problem is that since closed windows are still in the Windows Collection, they reappear.

I did write some code called "OnClientClose that does successfully delete the window from the windows collection on the client side, but it doesn't persist. That code is below:

function rwmPromote_Close(sender, eventargs) {
    var rwm = $find(window['rwmPromoteId']);
    var oWindows = rwm.GetWindows();
    var i;
    for (i = 0; i < oWindows.length; i++) {
        var oWindow = oWindows[i];
        if (oWindow == sender)
            break;
    }
    if (i < oWindows.length) {
        rwm._windows.splice(i, 1);
    }
}

This code was added in desperation to try and get the information persisted to the server side. I tried setting EnableViewState to false, but as expected that makes it forget about all Windows in the Windows collection except for ones added during that postback, which means it does forget about closed windows but also forgets about minimized windows.

I am about to add a HiddenField which will contain the ClientIDs of all Windows and then I will use that server side to deduce which windows, if any, were closed. While I am hopeful this will work, I am sure it's not the way it is supposed to work.

Added later! I have implemented the HiddenField solution as follows and it works successfully, but I don't think this is the proper way to achieve my goal.

function rwmPromote_Close(sender, eventargs) {
    var rwm = $find(window['rwmPromoteId']);
    var hf = $get(window['hfWindowIdsId']);
    hf.value = '';
    var oWindows = rwm.GetWindows();
    var i;
    for (i = 0; i < oWindows.length; i++) {
        var oWindow = oWindows[i];
        if (oWindow == sender)
            break;
    }
    if (i < oWindows.length) {
        rwm._windows.splice(i, 1);
        oWindows = rwm.GetWindows();
        for (i = 0; i < oWindows.length; i++) {
            hf.value += oWindows[i].id + ',';
        }
    }
}
 
and in the code behind.

// At the conclusion of every postback
  
hfWindowIds.Value = "";
foreach (RadWindow rw in rwmPromote.Windows)
{
    hfWindowIds.Value += rw.ClientID + ',';
}
 
// And then on the ValueChanged event for the HiddenField
 
        protected void hfWindowIds_ValueChanged(object sender, EventArgs e)
        {
            char[] sep = {','};
            string[] WindowIds = ((HiddenField)sender).Value.Split(sep, StringSplitOptions.RemoveEmptyEntries);
            List<RadWindow> rwList = new List<RadWindow>();
            foreach (RadWindow rw in rwmPromote.Windows)
            {
                if (!WindowIds.Contains(rw.ClientID)) rwList.Add(rw); // No longer open client side
            }
            foreach (RadWindow rw in rwList)
                rwmPromote.Windows.Remove(rw);  // Remove each closed window
        }
    }

This is all working, but I would pre3fer to know the "correct" way to achieve my goal.

Martin

Suggestions welcomed!!
Marin Bratanov
Telerik team
 answered on 06 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?