Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
443 views
I have the following RadGrid.

<telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" Width="990"
                             AllowFilteringByColumn="true" AllowSorting="True" AllowPaging="True" PageSize="15" 
                             AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
                             DataSourceID="edsAutomationTests" Skin="Web20" AutoGenerateDeleteColumn="True"
                             AutoGenerateEditColumn="False" AutoGenerateColumns="False">
                <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" ShowFooter="false"
                                 DataKeyNames="ID" DataSourceID="edsAutomationTests" EditMode="PopUp">
                    <EditFormSettings>
                        <PopUpSettings Modal="true" />
                    </EditFormSettings>


If I do nothing other than this the edit click does work as the edit form is displayed in a pop up.

However, if I add the following code to the project:

The edit column:
 
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="LinkButton"  HeaderStyle-Width="60px" ></telerik:GridEditCommandColumn><br>

and now edit form settings designating the user control for the popup:

 </Columns><br>             <EditFormSettings UserControlName="AutomationTestsEditForm.ascx" EditFormType="WebUserControl" ><br>                     <EditColumn UniqueName="EditCommandColumn"></EditColumn><br>             </EditFormSettings><br></MasterTableView>

Now i have my usercontrol showing inline in the page when I click the edit link. So it does not display in a popup. Also I'm getting all kinds of garbage on my user control. Edit links and delete links. As if the user control was simply inserted inline in code and it totally messed up the format of the grid on the page.

Hopefully someone can see why my control is not showing up in a popup.

Thanks,
Julian
Top achievements
Rank 1
 answered on 23 Jun 2014
3 answers
274 views
I have reviewed your demo on Edit Form Types. Specifically where a custom user control is utilized for the edit functionality. I am using WebForms with EF6. So my grids are populated by entity models.

So my question is how do I rebind the grid after editing a row with my custom user control? I believe the live samples supposedly had a solution for this but I couldn't get my live samples to work locally (sql issue). Can you provide me with a sample where the data source is a entity framework datasource (EntityDataSource)?

Thanks,

Julian
Viktor Tachev
Telerik team
 answered on 23 Jun 2014
2 answers
109 views
I have a radgrid where I group items by column "Group". There are groups that contains 1000 rows and these do not get grouped including all the records of the group but only including those visible on the page! 
The only turn around I have been able to implement is to make the page size bigger than the bigger group of items. This torn around causes other problems and I would like to find a better solution.
Is it possible to group rows not being displayed in the page under the same group?

Thanks,
Felice
Princy
Top achievements
Rank 2
 answered on 23 Jun 2014
7 answers
143 views
Hi Danail,

As part of my charting upgrade I decided to look at the gauges that I use.  

I already have a good looking gauge that is generated in some code however it is just done as an image,  what I am trying to do now is to use the existing gauge as a background and overlay the RadGauge on top.

To that end, is there any way to hide the cap and adjust the length of the pointer?

Regards

Jon
Danail Vasilev
Telerik team
 answered on 23 Jun 2014
5 answers
280 views
Hi,
DotNet version(runtime) v2.0.50727 
Telerik RadAjax.Net2 version:1.8.4.0 using.
RadAjaxManager IE9 working in compatibility mode.
But firefox 9.0.1 not working :(


<radA:RadAjaxManager ID="RAM" EnableOutsideScripts ="true" EnableAJAX="true" runat="server" OnAjaxRequest="RAM_AjaxRequest">
    <AjaxSettings>
         
        <radA:AjaxSetting AjaxControlID="pnlDersSoruSelector">
            <UpdatedControls>
                <radA:AjaxUpdatedControl ControlID="divOnlineSinav" LoadingPanelID="loadingSoru" />
                <radA:AjaxUpdatedControl ControlID="pnlDersSoruSelector" LoadingPanelID="loadingSoruSel" />
                <radA:AjaxUpdatedControl ControlID="btnSinav" />
            </UpdatedControls>
        </radA:AjaxSetting>
         
        <radA:AjaxSetting AjaxControlID="btnOnceki">
            <UpdatedControls>
                <radA:AjaxUpdatedControl ControlID="divOnlineSinav" LoadingPanelID="loadingSoru" />
                <radA:AjaxUpdatedControl ControlID="pnlDersSoruSelector" />
            </UpdatedControls>
        </radA:AjaxSetting>
        <radA:AjaxSetting AjaxControlID="btnSonraki">
            <UpdatedControls>
                <radA:AjaxUpdatedControl ControlID="divOnlineSinav" LoadingPanelID="loadingSoru" />
                <radA:AjaxUpdatedControl ControlID="pnlDersSoruSelector" />
            </UpdatedControls>
        </radA:AjaxSetting>
        <radA:AjaxSetting AjaxControlID="divSure">
            <UpdatedControls>
                <radA:AjaxUpdatedControl ControlID="RAM" />
                 
            </UpdatedControls>
        </radA:AjaxSetting>
        <radA:AjaxSetting AjaxControlID="RAM">
            <UpdatedControls>
                <radA:AjaxUpdatedControl ControlID="divYanitlar" />
                <radA:AjaxUpdatedControl ControlID="divYanitlar" />
            </UpdatedControls>
        </radA:AjaxSetting>
    </AjaxSettings>
</radA:RadAjaxManager>


function sinaviBitir()
       {
           mins = -1;
           var ajaxPanel = <%= RAM.ClientID %>;
           ajaxPanel.AjaxRequest();
       }
        
       window.attachEvent('onload',function(){initializeTimer();});
         
       function radCloseWindow()
       {  
           var oWnd = window.opener;
           oWnd.refresh();
           window.close();
           return false;
       }

protected void RAM_AjaxRequest(object sender, AjaxRequestEventArgs e)
   {
       sinaviBitir();
       RAM.ResponseScripts.Add("radCloseWindow()");
   }

zafer
Top achievements
Rank 1
 answered on 23 Jun 2014
1 answer
160 views
I am having a tilelist with the following settings:
<telerik:RadTileList runat="server" ID="RadTileList1" AppendDataBoundItems="true" SelectionMode="Multiple"
    TileRows="1" 
    Height="100px" Width="980px"  ScrollingMode="None"
    <DataBindings>
        <CommonTileBinding TileType="RadImageAndTextTile" DataGroupNameField="TOOL" />
        <ImageAndTextTileBinding DataTextField="LOT_ID" />
        <TilePeekTemplate>
            <div class="peekTemplateClass">
                <strong>Product:</strong>
                <%#DataBinder.Eval(Container.DataItem, "PRODUCT")%>
                <br />
            </div>
        </TilePeekTemplate>
    </DataBindings>
    <Groups>
        <telerik:TileGroup Name="24575">
            <telerik:RadContentTemplateTile ID="RadContentTemplateTile27" runat="server" CssClass="noHover"
                Height="75px">
                <ContentTemplate>
                    <div class="innerTitle">
                        <strong>24575</strong>
                    </div>
                </ContentTemplate>
            </telerik:RadContentTemplateTile>
        </telerik:TileGroup>
    </Groups>
</telerik:RadTileList>

And in the code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
 
public partial class StockerViewMonitor : System.Web.UI.Page
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            FcDAL.SetupOracleDBConnection(Helper.GetScConnStr());
        }
  
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                LoadList();
         }
  
        protected void fetchButton_OnClick(object sender, EventArgs e)
        {
            List<RadBaseTile> selectedTiles = RadTileList1.GetSelectedTiles()
 
            DbCommand[] deleteCmds = new DbCommand[selectedTiles.Count];
            int j = 0;
            foreach (RadBaseTile tile in selectedTiles)
            {
                deleteCmds[j] = FcDAL.CreateDbCommand("DELETE A_GF_TOOL_LOT WHERE LOT_ID=:0", ((RadImageAndTextTile)tile).Text);
                j++;
            }
            FcDAL.ExecuteTransaction(deleteCmds);
                LoadList();
  
        }
       
        private DataTable GetLotList(int toolID)
        {
               // Get retRetable
           return retTable;
        }
  
        private void LoadList()
        {
            RadTileList1.DataSource = GetLotList(24575);
            RadTileList1.DataBind();
        }
        }
    }

When I first load the page and selected some tiles and click on the fetch button for the first time, I can get all the the tiles that have been selected and delete those records from DB. 

The problem is, after that, if I select some of other tiles, and click fetch button, the selected tiles are not recognized any more, and hence I couldn't delete them from DB.

I suspect the postdata in the post back request is different from the data stored in ViewState, thus making the selection changed event not fired. I tried to call the LoadList() method at Page_Init() and Page_Onload bit they seemed not working.

Is there any wrong understanding ? And how do I resolve the above problem?
Thank you very much

*Note: Some of the irrelevant codes are removed from the above code snippet.
Shinu
Top achievements
Rank 2
 answered on 23 Jun 2014
1 answer
110 views
Hi there,
I have a grid that when a row is selected it shows some data in another grid. which works fine.
I also have a timer that fires every 5 seconds to rebind the 1st grid. the data in the 2nd grid stays the same which is good but when the first grid rebinds on the timer tick event the selected row in the 1st grid is no longer selected.

How can I persist the row selection on rebind?


Thanks
Jamie
Princy
Top achievements
Rank 2
 answered on 23 Jun 2014
3 answers
207 views
We are using RadControls for ASP.NET AJAX version 2010.1.519.40

When a RadComboBox is inside of a panel with the DefaultButton set and the <enter> key is pressed the default button does not fire in IE or Chrome.  It works in Firefox.

Here is a sample page with two RadComboBox controls and three buttons inside of a panel that I created to demonstrate this issue:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadComboBox.aspx.cs" Inherits="RadControlsWebApp1.RadComboBox" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript">
        function logEvent(eventToLog) {
            if (eventToLog == null) {
                $(".infoArea").html('');
            }
            else {
                var txt = $(".infoArea").html();
                txt = eventToLog + '<br>' + txt;
                $(".infoArea").html(txt);
            }
        }
        function rcbComboBox_ClientKeyPressing(sender, eventArgs) {
            var keyCode = eventArgs.get_domEvent().keyCode;
            logEvent('----------------------------------------------------');
            logEvent('rcbComboBox_ClientKeyPressing (' + sender._uniqueId + ' --> ' + keyCode + ')');
            if (keyCode == 13 && !sender.get_dropDownVisible()) {
                logEvent('<enter> key pressed while dropdown.visible = false');
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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>
    <div>
        <asp:Panel ID="pnlDefault" runat="server" DefaultButton="btnSubmit">
            <telerik:RadComboBox ID="rcbOne" runat="server" OnClientKeyPressing="rcbComboBox_ClientKeyPressing">
                <Items>
                    <telerik:RadComboBoxItem Text="Item 0" />
                    <telerik:RadComboBoxItem Text="Item 1" />
                    <telerik:RadComboBoxItem Text="Item 2" />
                    <telerik:RadComboBoxItem Text="Item 3" />
                </Items>
            </telerik:RadComboBox>
            <telerik:RadComboBox ID="rcbTwo" runat="server" OnClientKeyPressing="rcbComboBox_ClientKeyPressing">
                <Items>
                    <telerik:RadComboBoxItem Text="Item 0" />
                    <telerik:RadComboBoxItem Text="Item 1" />
                    <telerik:RadComboBoxItem Text="Item 2" />
                    <telerik:RadComboBoxItem Text="Item 3" />
                </Items>
            </telerik:RadComboBox>
            <asp:Button ID="btnOne" runat="server" Text="Button One" OnClientClick="logEvent('btnOne_Click'); return(false);" />
            <asp:Button ID="btnTwo" runat="server" Text="Button Two" OnClientClick="logEvent('btnTwo_Click'); return(false);" />
            <asp:Button ID="btnSubmit" runat="server" Text="Default Button" OnClientClick="logEvent('btnSubmit_Click!!!!'); return(false);" /><br />
            <br />
            <div class="infoArea">
            </div>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
Nencho
Telerik team
 answered on 23 Jun 2014
1 answer
250 views
I am running my RadPivotGrid off of a SQL Server datasource. We are running on a decently large initial result set (about 3000 records) and so in the datasource "selecting" method I check to see if this is a postback or not. If it is, I cancel the event (so we don't have to wait to load results the first time around before proper filters are applied).

I haven't seen a lot of discussion on the forum on this EnableCaching property and how it is supposed to work. What I have noticed is that if I cancel that first event (and have EnableCaching="true") the PivotGrid never again displays any results. 

The search form, to which the datasource is connected is activated with each click of the Search button by this event handler:

Protected Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
    'Bind the pivot grid.
    pvtCMStoG2.DataBind()
End Sub

Is there some other method I should use?

Secondarily, I noticed that there is a property on the PivotGrid for Performance Optimization using the IQueryable type results but for the life of me can't find any real documentation or samples of what that is all about... I need to speed up the performance of the PivotGrid beyond its current speed or I am going to have the users complaining all over the place :)
Viktor Tachev
Telerik team
 answered on 23 Jun 2014
3 answers
100 views
MonthYearPicker Can double-click to select month?
Princy
Top achievements
Rank 2
 answered on 23 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?