Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
403 views
Hello,

Today, when a user selects "Add new record", the new line is inserted at the first position of the Grid. What Should I do to add this line at the last position of the Grid page ?

Thanks,

Stephane
Rahardi
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
140 views
Hi, I'm using Telerik 2014.1.403.45. I have the problem with the LinkButton in my RadOrgChart node.

I put RadOrgChart in RadAjaxPanel. there are the LinkButtons in OrgChart Nodes. LinkButtons work correctly after page_load.
However, if I dragged and dropped the node and then clicked on a LinkButton, it will only do postback to page_load but no CommandEventArgs . The events of the LinkButton only works on the second click.

Page
<telerik:RadAjaxPanel ID="panOrganize" runat="server" CssClass="OrganizeCanvas" LoadingPanelID="radAjaxLoadingPanel">
    <telerik:RadTabStrip ID="rtabOrganize" runat="server" MultiPageID="rmpOrganize" SelectedIndex="0" Width="100%" CssClass="FontBold" OnTabClick="rtabOrganize_TabClick">
        <Tabs>
            <telerik:RadTab CssClass="FontBold" Text="Organize Chart" />
            <telerik:RadTab CssClass="FontBold" Text="Position" Enabled="false" />
            <telerik:RadTab CssClass="FontBold" Text="User" Enabled="false" />
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="rmpOrganize" runat="server" SelectedIndex="0">
  
        <telerik:RadPageView ID="rpvOrgOrganize" runat="server" Width="100%">
            <telerik:RadOrgChart ID="radOrgChart" runat="server" Width="100%" CssClass="SpacingBottom20" LoadOnDemand="Nodes"
                DataFieldID="OrgID" DataFieldParentID="ParentID"
                EnableDragAndDrop="true" OnNodeDrop="radOrgChart_NodeDrop">
                <ItemTemplate>
                    <asp:Panel ID="panNode" runat="server" CssClass="TemplateHolder">
                        <asp:Table ID="tbOrgChart" runat="server" Width="160px" Height="50px">
                            <asp:TableRow>
                                <asp:TableCell RowSpan="3" Width="30px" VerticalAlign="Middle">
                                        <i class="fa fa-home FontSize28"></i>
                                </asp:TableCell>
                                <asp:TableCell Width="5px" />
                                <asp:TableCell VerticalAlign="Top">
                                    <asp:Label ID="lblTypeName" runat="server" Text='<%# Eval("OrganizationType.TypeName")%>' CssClass="FontBold" />
                                </asp:TableCell>
                                <asp:TableCell Width="10px">
                                    <asp:LinkButton ID="lbtnSearch" runat="server" BorderStyle="None"
                                        CommandArgument='<%# Eval("OrgID")%>' CommandName='<%# Eval("Name")%>' OnCommand="lbtnSearch_Command">
                                        <i class="fa fa-search-plus"></i>
                                    </asp:LinkButton>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow>
                                <asp:TableCell RowSpan="2" />
                                <asp:TableCell RowSpan="2" ColumnSpan="2" VerticalAlign="Top">
                                    <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name")%>' />
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </asp:Panel>
                </ItemTemplate>
            </telerik:RadOrgChart>
            <telerik:RadContextMenu runat="server" ID="radContextMenu" CssClass="CustomContextMenu" Skin="Default" OnClientItemClicked="onClientItemClicked">
                <Items>
                    <telerik:RadMenuItem Text="Add" CssClass="rmAdd" Value="Add" />
                    <telerik:RadMenuItem Text="Edit" CssClass="rmEdit" Value="Edit" />
                    <telerik:RadMenuItem Text="Remove" CssClass="rmRemove" Value="Remove" />
                </Items>
            </telerik:RadContextMenu>
            <telerik:RadWindow ID="radWindow" runat="server" AutoSize="true" Modal="true" Behaviors="Close"
                VisibleTitlebar="true" VisibleStatusbar="false" OnClientClose="onClientClose">
            </telerik:RadWindow>
        </telerik:RadPageView>
  
        <telerik:RadPageView ID="rpvOrgPosition" runat="server" Width="100%">
        </telerik:RadPageView>
  
        <telerik:RadPageView ID="rpvOrgUser" runat="server" Width="100%">
        </telerik:RadPageView>
  
    </telerik:RadMultiPage>
</telerik:RadAjaxPanel>

Code Behind (C#)
protected void Page_Load(object sender, EventArgs e)
{
    radOrgChart_Load();
}
 
protected void radOrgChart_Load()
{
    radOrgChart.DataSource = String.Empty;
 
    //Get Data from EF
    List<Organization> listOrganize = organizeManager.GetOrganize();
    if (listOrganize.Count.Equals(0).Equals(false))
    {
        radOrgChart.DataSource = listOrganize;
    }
    radOrgChart.DataBind();
}
 
protected void radOrgChart_NodeDrop(object sender, OrgChartNodeDropEventArguments e)
{
    //Update Database
    organizeManager.UpdateParentID(new Guid(e.SourceNode.ID), new Guid(e.DestinationNode.ID));
 
    //Load the new data
    radOrgChart_Load();
}
 
 
 
protected void lbtnSearch_Command(object sender, CommandEventArgs e)
{
    //Open The second Tab, and set enable
    rtabOrganize_SetEnable(true, 1);
    rtabOrganize_SelectIndex(1);
 
    //Set data into ViewState
    vsOrganizationID = e.CommandArgument.ToString();
    vsOrganizationName = e.CommandName;
}

Nencho
Telerik team
 answered on 30 Jun 2014
9 answers
2.9K+ views
Hi,
   When a row is selected i want to rise an event to update a table with the values of selected row.
Can any one help on this issue.

Thanks,
Gopalakrishnan D
Pavlina
Telerik team
 answered on 30 Jun 2014
2 answers
154 views
I have two autocomplete boxes on the page, and per the demo I'm setting their datasources in the Page_Load event. 

I only want to hit the database once, however.   How can I get the ID of the control that initiated the postback?

I've used:

String control_id = Page.Request.Params.Get("__EVENTTARGET");

However, it returns an empty string- I imagine that's because it's a parital postback. 
Danny
Top achievements
Rank 2
 answered on 30 Jun 2014
10 answers
355 views

Using the scheduler control (Q3 2008), I'm having trouble getting it to expand or contract to fit the screen when the user resizes the browser (in both IE7 and FF3).  I built a sample page with only a RadScheduler control on it, like this:

<telerik:RadScheduler   
    runat="server"   
    ID="RadScheduler1"   
    OverflowBehavior="Expand"    
    Width="100%">  
</telerik:RadScheduler> 

The Scheduler fills the width of the screen, but if you resize the browser, you have to refresh the page in order to get the scheduler to resize.  After experimenting a bit, I found that I could get the scheduler to resize with javascript:

<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">   
    <script type="text/javascript">  
        window.onresize = function() {  
            var scheduler = $find('<%= RadScheduler1.ClientID %>');  
            scheduler.repaint();  
        }        
    </script>    
</telerik:RadScriptBlock>  

This works until you try to put the scheduler inside a table... after that, it no longer resizes properly.  The masterpage layout on our site uses tables, and we don't have resizing problems with any other types of controls.  It doesn't seem like I should have to jump through the javascript hoops to get the scheduler to resize.  Any ideas? 
Plamen
Telerik team
 answered on 30 Jun 2014
7 answers
494 views
I set this to false in my web.config and haven't noticed any issues.  Is there any reason that Telerik sets this to true by default?
Petar
Telerik team
 answered on 30 Jun 2014
2 answers
261 views
Hello,

I want to configure the calendar, so I can show the days of the month on one single row, I tried the following settings:

<telerik:RadCalendar ID="RadCalendar" runat="server" HideNavigationControls="true" ShowNavigationButtons="false" ShowRowHeaders="false" ShowColumnHeaders="false" ShowFastNavigationButtons="false" SingleViewColumns="31" SingleViewRows="1" FocusedDate="6/1/2014" Skin="MetroTouch" TitleAlign="Left"></telerik:RadCalendar>


These settings display the days for the month "6" in single row, but it only display 24 days not all days, how can I display all days of the month in one single row.

Thanks in advance.
Bary


Bary
Top achievements
Rank 1
 answered on 30 Jun 2014
1 answer
128 views
Hello, 


I know that the radgrid is 508 compliant, but the filtering columns on the radgird might be not 508 compliant. Is that correct? if so, how can I resolve this issue.  I tested it in IE browser using Web Accessibility toolbar from paciello group. They resulted there are no label inputs for the radgrid.

Thanks,
Chi Ming 
Radoslav
Telerik team
 answered on 30 Jun 2014
3 answers
102 views
Hi,

The following example on a RadGrid:
<ClientEvents OnColumnClick="function(){alert(1)}" />

On a iPad with IOS 6, we don't get the alert at all.

Regards
Caesar
Marin
Telerik team
 answered on 30 Jun 2014
1 answer
257 views
Hi,

I just want to bind a simple boolean to a checkbox, but it isn't working.
All tries to get the bool into the grid will be answered with a NullException ... but why??

A first chance exception of type 'System.NullReferenceException' occurred in App_Web_patoy0yq.dll


    <telerik:RadGrid ID="RadGrid1" runat="server" Culture="de-DE" ShowStatusBar="True" AllowPaging="True" PageSize="5" Width="800px"
        DataKeyValues="Id, ModuleName, IsActive, NavigationPath" OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemDataBound="RadGrid1_ItemDataBound">
        <MasterTableView Width="100%" AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="Id, ModuleName, IsActive, NavigationPath" EditMode="PopUp"
            NoDetailRecordsText="Keine Detaileinträge." NoMasterRecordsText="Keine Einträge." RetrieveNullAsDBNull="False">
            <Columns>

                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ItemStyle-Width="30px">
                    <ItemStyle Width="30px"></ItemStyle>
                </telerik:GridEditCommandColumn>

                <telerik:GridBoundColumn DataField="Id" DataType="System.Guid" HeaderText="Modul Id" ReadOnly="true"
                    SortExpression="ModuleId" UniqueName="ModuleId">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>

                <telerik:GridBoundColumn DataField="ModuleName" DataType="System.String" HeaderText="Modul Name"
                    SortExpression="ModuleName" UniqueName="ModuleName">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>

                <%--<telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="Modul aktiviert"
                    SortExpression="ModuleIsActive" UniqueName="ModuleIsActive">
                </telerik:GridCheckBoxColumn>--%>      <%-- Tried this, but no values (always FALSE) --%>

                <telerik:GridTemplateColumn HeaderText="IsActive" UniqueName="TemplateColumn">
                    <EditItemTemplate>
                        <asp:CheckBox ID="editChkBox" runat="server"
                            Checked='<%# Bind("IsActive") %>'></asp:CheckBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="defaultChkBox" runat="server"
                            Checked='<%# Eval("IsActive") %>'></asp:CheckBox>    <%-- << NullException here! --%>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>

                <telerik:GridBoundColumn DataField="NavigationPath" DataType="System.String" HeaderText="Modul Navigationspfad"
                    SortExpression="ModuleNavigationPath" UniqueName="ModuleNavigationPath">
                    <ColumnValidationSettings>
                        <ModelErrorMessage Text=""></ModelErrorMessage>
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>

                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="ImageButton" ItemStyle-Width="30px">
                    <ItemStyle Width="30px"></ItemStyle>
                </telerik:GridButtonColumn>

            </Columns>

        </MasterTableView>

        <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
            <Selecting AllowRowSelect="true"></Selecting>
        </ClientSettings>
    </telerik:RadGrid>


I just want to get a bool .... !!! ??????
Princy
Top achievements
Rank 2
 answered on 30 Jun 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?