Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
979 views
Hi,
 
I am using RAD GRID for display 10 -15 rows.

There is a requirement to change the row sort order for the rows in the Rad Grid using Move Up and Move Down button.

Clicking on Move Up will change the sort order i.e if a row is in posiiton 7, it will be brought to 6

Clicking on Move Down will change the sort order i.e if a row is in posiiton 7, it will be brought to 8

Is there a sample or api available to achieve this ?
Anjali
Top achievements
Rank 1
 answered on 09 May 2017
5 answers
247 views

When i use this code in the page_load it opens the window as expected, when I use it in the itemCommand (and it runs in the debugger) it does not and I dont see any errors?

 

RadWindow fileWindow = new RadWindow();
        fileWindow.NavigateUrl = "http://www.google.com";
        fileWindow.VisibleOnPageLoad = true;
        fileWindow.ID = "fileWindow1";
        fileWindow.Width = 500;
        fileWindow.Height = 300;
        fileWindow.InitialBehaviors = WindowBehaviors.Maximize | WindowBehaviors.Close | WindowBehaviors.Resize;
        RadWindowManager2.Windows.Add(fileWindow);

John
Top achievements
Rank 1
 answered on 08 May 2017
1 answer
190 views
I removed the telerik references in visual studio to test something out in my app, I added them back in but now RadEditor will not load.  Anyone know what would cause this problem?
Rumen
Telerik team
 answered on 08 May 2017
6 answers
678 views

hi,
I am using the following code in aspx.cs and aspx page to turn off/on the filetring of radgrid, but its working in reverse. When I click on FilterOn button, filters hide and when I click on FilterOff button, filters show up..it should not work like that

protected void btnFilterOn_Click(object sender, EventArgs e) 
        rdgResult.MasterTableView.TableLayout = GridTableLayout.Auto; 
        rdgResult.AllowFilteringByColumn = true; 
        rdgResult.MasterTableView.AllowFilteringByColumn = true; 
        hdnFilterState.Value = "ON"
        this.BindGrid(); 
        ibtnFilterOff.Visible = true; 
        ibtnFilterOn.Visible = false; 
        btnFilterOnBtm.Visible = false; 
        btnFilterOffBtm.Visible = true; 
        
protected void btnFilterOff_Click(object sender, EventArgs e) 
       rdgResult.MasterTableView.TableLayout = GridTableLayout.Auto; 
        rdgResult.AllowFilteringByColumn = false; 
        rdgResult.MasterTableView.AllowFilteringByColumn = false; 
        hdnFilterState.Value = "OFF"
        this.BindGrid(); 
        ibtnFilterOff.Visible = false; 
        ibtnFilterOn.Visible = true; 
        btnFilterOnBtm.Visible = true; 
        btnFilterOffBtm.Visible = false;
 }

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel"> 
                                    <AjaxSettings
                                        <telerik:AjaxSetting AjaxControlID="rdgResult"
                                            <UpdatedControls
                                                <telerik:AjaxUpdatedControl ControlID="rdgResult" /> 
                                            </UpdatedControls
                                        </telerik:AjaxSetting
                                    </AjaxSettings
</telerik:RadAjaxManager
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Transparency="50"
                                    <img alt="Loading..." src="Images/Loading.gif" style="border: 0px; margin-top: 60px;" /> 
</telerik:RadAjaxLoadingPanel
    
<telerik:RadGrid ID="rdgResult" runat="server" Skin="Office2007" Width="957px" BackColor="White"
                                        AutoGenerateColumns="true" PageSize="10" AllowSorting="True" AllowPaging="True"
                                        filtercontrolwidth="5px" AllowFilteringByColumn="false" showfiltericon="true"
                                        filterlistoptions="VaryByDataType" showsorticon="true" EnableViewState="true"
                                        ClientSettings-Scrolling-AllowScroll="true" OnNeedDataSource="rdgResult_NeedDataSource"
                                        OnItemDataBound="rdgResult_ItemDataBound" OnColumnCreated="rdgResult_ColumnCreated"
                                        OnItemCreated="rdgResult_ItemCreated" OnDetailTableDataBind="rdgResult_DetailTableDataBind"
                                        OnExcelMLExportRowCreated="rdgResult_ExcelMLExportRowCreated" OnExcelMLExportStylesCreated="rdgResult_ExcelMLExportStylesCreated"
                                        OnPreRender="rdgResult_PreRender"
                                        <HeaderStyle Width="160px" HorizontalAlign="Center" CssClass="clsTableHeading1" /> 
                                        <ItemStyle Font-Size="8pt" HorizontalAlign="Left" CssClass="clsTableCellLeft" /> 
                                        <ExportSettings FileName="Detail Report" IgnorePaging="true" Excel-Format="ExcelML" /> 
                                        <ClientSettings EnableRowHoverStyle="false"
                                            <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" /> 
                                            <Scrolling AllowScroll="false" UseStaticHeaders="true" ScrollHeight="100"/> 
                                        </ClientSettings
                                        <MasterTableView TableLayout="Auto" Name="DetailRpt" Width="100%" Height="90%" AllowMultiColumnSorting="false"
                                            DataKeyNames="Document #" HierarchyLoadMode="ServerOnDemand" HeaderStyle-Font-Bold="true"
                                            HeaderStyle-HorizontalAlign="Center" AllowFilteringByColumn="false" ItemStyle-HorizontalAlign="Left"
                                            <%-- <HeaderStyle Width="200px" />--%> 
                                            <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric"></PagerStyle
                                            <NoRecordsTemplate
                                                <span class="clsTableCellCenter" style="padding-left: 250px;"><b>Sorry, there is no 
                                                    matching data available for display.</b></span
                                            </NoRecordsTemplate
                                            <Columns
                                                <telerik:GridTemplateColumn HeaderStyle-Width="30px" HeaderText="Sel" ShowFilterIcon="false"
                                                    DataField="column value" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false"
                                                    ItemStyle-HorizontalAlign="Center"
                                                    <ItemTemplate
                                                        <asp:Literal ID="RadioButtonMarkup" runat="server" EnableViewState="true"></asp:Literal
                                                                                    <input type="hidden" id="hdnDocNo" name="hdnDocNo" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Document #")%>' /> 
                                                        <input type="hidden" id="hdnRevision" name="hdnRevision" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"Rev Ltr")%>' /> 
                                                        <input type="hidden" id="hdnFlag" name="hdnFlag" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"SHOWHYPERLINK")%>' /> 
                                                        <input type="hidden" id="hdnStatus" name="hdnStatus" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"STATUS")%>' /> 
                                                    </ItemTemplate
                                                </telerik:GridTemplateColumn
                                            </Columns
                                              
                                        </MasterTableView
                                    </telerik:RadGrid>

Thanks in Advance.
G
Top achievements
Rank 1
 answered on 08 May 2017
1 answer
129 views
Is it possible to do a Grid Update with a UserControlform without using a Hashtable?
Eyup
Telerik team
 answered on 08 May 2017
3 answers
347 views

RadScriptManager is trying to load WebUIValidation from an address that does not exist.

I have two scenarios:

1 - When the RadScriptManager is configure like below [0] the script tag [1] is generated which try to load the script from an unexistent place.

[0] -

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="500"
        ScriptPath="~" ScriptMode="Release">
        <Scripts>
              .... custom scripts ...
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>

[1] - 

<script src="System.Web/4.0.0.0/4.6.1637.0/WebUIValidation.js" type="text/javascript"></script>

 

2 - When the  RadScriptManager is configure like below [2] there is no error to load the script, however the error happens when a content is loaded via Ajax using the RadAjaxManagerProxy at this time it's triggered by an internal call of Telerik.Web.UI.WebResource.axd.

 

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="500"
        EnablePageMethods="true" ScriptPath="~" ScriptMode="Release" >
        <Scripts>
            .... custom scripts ...
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            <asp:ScriptReference Assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Path="~/js/WebUIValidation.js" Name="WebUIValidation.js" />
        </Scripts>
    </telerik:RadScriptManager>

Marin Bratanov
Telerik team
 answered on 08 May 2017
0 answers
253 views

Hi,

In my application I want to display simple grid with paging and filtering functionality. I am using custom paging for pagination of the grid.

My NeedDataSoure look like this

protected void rgList_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {

 Meeting360Entities db = new Meeting360Entities();
       
            var query = from c in db.Committees
                        select c;
            
            var Data = query.ToList();
            rgList.DataSource = Data.Skip(rgList.CurrentPageIndex * rgList.PageSize).Take(rgList.PageSize); // This line will selects records need to display on screen.  
            rgList.VirtualItemCount = Data.Count;

}

Like my above code in want select filtered data from data base. So how can in add WHERE clause into my linq query.

     <telerik:RadGrid ID="rgList" runat="server" AutoGenerateColumns="false" OnItemCommand="rgList_ItemCommand" GridLines="None"  
                                    ClientSettings-EnableRowHoverStyle="true" PagerStyle-Position="Bottom" AllowPaging="True" AllowCustomPaging ="true" PageSize="10" OnNeedDataSource="rgList_NeedDataSource"
                                    AllowFilteringByColumn="true">
                                    <MasterTableView DataKeyNames="CommitteeID" ClientDataKeyNames="CommitteeID">
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="CommitteeID" HeaderText="CommitteeID" UniqueName="CommitteeID" Visible="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" UniqueName="Name" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ShowFilterIcon="false">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn>
                                                <ItemTemplate>
                                                    <telerik:RadButton ID="btnEdit" runat="server" CommandArgument='<% #Eval("CommitteeID")%>' CommandName="ItemEdit" Text="Edit"></telerik:RadButton>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                    <ClientSettings>
                                        <Selecting AllowRowSelect="true"></Selecting>
                                    </ClientSettings>
                                </telerik:RadGrid>

Chirag
Top achievements
Rank 1
 asked on 07 May 2017
2 answers
107 views
I'm working on creating a mobile version of a RadGrid with RenderMode = RenderMode.Mobile. We are experiencing an issue with the GridNumericColumn when it is in edit mode. If the row is open for editing and the stored value is greater than 999, the numeric control is cleared out (blank). If I save the value to 999 or lower, it is displayed correctly. Any ideas? The grid and page work fine when the RenderMode is set to classic. The grid also has AllowScroll = true.
CDK
Top achievements
Rank 1
 answered on 06 May 2017
4 answers
140 views

Hi All,


GridLines are not working in RadGrid. Autogenerated columns = true


my coding:

 

<

 

 

telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"

 

 

 

 

 

 

 

OnDetailTableDataBind="RadGrid1_DetailTableDataBind"

 

 

 

AutoGenerateHierarchy="true" GridLines="Both"

 

 

 

oncolumncreated="RadGrid1_ColumnCreated1" Skin="WebBlue" >

 

 

 

 

 

 

 

 

</telerik:RadGrid>

 




Bharat Rathore
Dennis
Top achievements
Rank 2
 answered on 05 May 2017
1 answer
267 views

Hello,

I used the lightbox to show a list of data when the user is clicking on a information button. Everything is working as expected. But then on the mobile test of the feature i get to know that something is wrong with the scrolling feature on iOS Safari browser.

So there is a scrollable Content inside the lightbox but when you scroll by touching the glass of phone only the background is scrolling, not the content of the lightbox. On each other platform the Dom working like I expect the modal dialog.

I worked around with the z-indexes of the controls, but no setting get my issue to work. So I tested the issue on the demo site of telerik lightbox (http://demos.telerik.com/aspnet-ajax/lightbox/examples/overview/defaultcs.aspx) and have the same problem.

Is there any workaround to fix this scrolling problem?

Best Wishes

Roland Klug

 

 

Rumen
Telerik team
 answered on 05 May 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?