Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 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
201 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
236 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
98 views
MonthYearPicker Can double-click to select month?
Princy
Top achievements
Rank 2
 answered on 23 Jun 2014
2 answers
240 views
What i am trying to do is the RadAsyncUpload control is disabled by default and on selection of an item from Combobox i want to enable RadAsyncUpload control. for this i am calling an javascript. it enables the RadAsyncUpload control but not the control is not actually working as RadAsyncUpload control

here is the javascript:

  function ddlDocTypeOnClientSelectedIndexChanged(sender, args) {
     
        var Uploader = $find("<%= rdFileUpload.ClientID %>");
      
        Uploader.set_enabled(true);
      
    }

Please let me know what I am missing here.


Payal
Top achievements
Rank 1
 answered on 23 Jun 2014
3 answers
725 views
I am brand new to the world of coding web pages and have a question. 

I have a table on a RadAjaxPanel. The first column is description labels and a couple of the labels have a button to pop detail.  The remaining columns are actually the data we are editing and are a RadListView.  When the user clicks on a detail button, we pop a modal window, do some data entry, recalculate and then update and save the information that is being displayed/edited in the RadListView.  This all works great unless the user has edited data in the RadListView and then pops the detail before saving the data.  If that happens, the detail gets saved, the data being displayed in the RadListView gets reloaded, tweaked and saved basically throwing away any changes the user made and did not save. 

To try and get around this, I added an OnClientClick call to a javascript function that would  fire the onclick of the forms "save" button and return true so that the detail modal form would fire up based on the onclick event.  Well, the onclientclick fires, but then the onclick never does.  If it matters, I set the onclientclick event statically and set the onclick dynamically during the page load so I can pass the correct guid as a parameter to the detail modal form. I did this based on info I found that said OnClientClick fires before the OnClick event and the OnClick event fires or not based on the return value of the OnClientClick event.

Any thoughts/comments?
Viktor Tachev
Telerik team
 answered on 23 Jun 2014
5 answers
193 views
Is anyone else experiencing a problem with paging in a Radgrid when the screen is viewed with Internet Explorer 11?  Clicking on the pager imagebuttons for First, Prev, Next, or Last initiates a partial postback but the content of the radgrid do not change.

The paging works fine in current versions of Chrome and Firefox.

This is a .NET 3.5 app using Q3 2012 Telerik Radcontrols.  Would an upgrade to Q3 2013 solve the issue?
Eyup
Telerik team
 answered on 23 Jun 2014
1 answer
88 views
File Upload window is installed in the flash file you want to upload the file upload is in progress, this is not. If you are going to install Silverlight will be added. I'd like to know why ie8 for windows 7 environment. Initially anhaeteul Flash or Silverlight if you install anything to the normal operation ...
Ianko
Telerik team
 answered on 23 Jun 2014
1 answer
178 views
Hi,

I have taken a RAD Grid having 3 combo box columns, I wan to implement batch update and need to update the database on code behind, please let me know which event of grid should I handel for inserting new item (single row) & batch update modified items to database (only modified rows). also please let me know how can i get the values from grid to insert in database for insert new row or for bulk update.

below is my code

.aspx page
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
        CellSpacing="-1" GridLines="Both" onneeddatasource="RadGrid1_NeedDataSource"
        onprerender="RadGrid1_PreRender">
        <MasterTableView EditMode = "Batch" CommandItemDisplay ="TopAndBottom">
            <Columns>
                <telerik:GridBoundColumn DataField="trans"
                    FilterControlAltText="Filter column column" HeaderText="TransactionID"
                    UniqueName="column">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn DataField="EmployeeName"
                    FilterControlAltText="Filter EmployeeName column"
                    UniqueName="EmployeeName" HeaderText="Employee Name">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="RCBEmployee" Runat="server"
                            EmptyMessage="Select Employee">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%# Eval("EmployeeName") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Department"
                    FilterControlAltText="Filter Department column" UniqueName="Department"
                    HeaderText="Department">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="rcbdept" Runat="server">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                         <%# Eval("Department") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="Skill"
                    FilterControlAltText="Filter Skill column" UniqueName="Skill"
                    HeaderText="Skill">
                    <EditItemTemplate>
                        <telerik:RadComboBox ID="RCBSkill" Runat="server">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <%# Eval("Skill") %>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        <BatchEditingSettings EditType ="Row" />
        </MasterTableView>
    </telerik:RadGrid>

ASPX.CS

 
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = PopulateGrid();
    }
 protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
       //Populating Employee
        RadComboBox combo = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_EmployeeName").FindControl("RCBEmployee") as RadComboBox;
        combo.DataSource = PopulateEmoloyee();
        combo.DataTextField = "EmployeeName";
        combo.DataValueField = "EmployeeID";
        combo.DataBind();       
//populating Department
        RadComboBox combodept = RadGrid1.FindControl(RadGrid1.MasterTableView.ClientID + "_Department").FindControl("rcbdept") as RadComboBox;
        combodept.DataSource = PopulateDepartment();
        combodept.DataTextField = "Department";
        combodept.DataValueField = "deptid";
        combodept.DataBind();   
}
Angel Petrov
Telerik team
 answered on 23 Jun 2014
3 answers
268 views
Hi All,

I have to convert a varbinary data into selected (it may be word/excel/PDF)  document type and show the content in browser itself. May i know which control in Rad will be use for this requirement?
Kostadin
Telerik team
 answered on 23 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?