Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
157 views
when i am trying sorting or filtering on  chrome i am getting script error Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: A control is already associated with the element. 
and sorting is not happing.
please refer UI design code
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabularData">
                <tr>
                    <td>
                        <telerik:RadTextTile ID="RadTextTile1" runat="server" Text="My WorkList" Width="100%"
                            Height="40px" Font-Size="Medium">
                        </telerik:RadTextTile>
                    </td>
                </tr>
            </table>
            <table style="width: 100%">
                <tr>
                    <td>
                        <asp:Label ID="lblWorkListMsg" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
                            <div id="divWorkList" class="tabularDisplayContainer" runat="server">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td>
                                            <telerik:RadGrid runat="server" ID="RadGrid1" AllowPaging="True" 
                                                AllowSorting="True"
                                                ShowStatusBar="True" AllowFilteringByColumn="True" OnSortCommand="RadGrid1_SortCommand"
                                                AutoGenerateColumns="False" OnPageIndexChanged="RadGrid1_PageIndexChanged"
                                                 
                                                >
                                                <MasterTableView >
                                                    <Columns>
                                                        <telerik:GridTemplateColumn HeaderText="Reference Number" SortExpression="Folio" AndCurrentFilterValue="true" DataField="Folio"
                                                         AutoPostBackOnFilter="true"  HeaderStyle-Width="20%" ItemStyle-Width="20%">
                                                            <ItemTemplate>
                                                                <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# Eval("Data")%>' Target="_parent"
                                                                    Text='<%# Eval("Folio")%>' runat="server" />
                                                            </ItemTemplate>
                                                            <HeaderStyle Width="20%" />
                                                            <ItemStyle Width="20%" />
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="RegistrationNumber" HeaderText="Registration Number" AutoPostBackOnFilter="true"
                                                            SortExpression="RegistrationNumber" HeaderStyle-Width="30%" ItemStyle-Width="30%">
                                                            <HeaderStyle Width="30%" />
                                                            <ItemStyle Width="30%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" AutoPostBackOnFilter="true"
                                                            HeaderStyle-Width="20%" ItemStyle-Width="20%">
                                                            <HeaderStyle Width="20%" />
                                                            <ItemStyle Width="20%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="UserID" HeaderText="User ID" SortExpression="UserID"
                                                            DataFormatString="{0:dd-MMM-yyyy}" HeaderStyle-Width="20%" ItemStyle-Width="20%"
                                                            Visible="false">
                                                            <HeaderStyle Width="20%" />
                                                            <ItemStyle Width="20%" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="StartDate" HeaderText="Submitted Date" DataFormatString="{0:dd-MMM-yyyy}"  
                                                            SortExpression="StartDate" HeaderStyle-Width="15%" ItemStyle-Width="15%" AutoPostBackOnFilter="true">
                                                            <HeaderStyle Width="15%" />
                                                            <ItemStyle Width="15%" />
                                                        </telerik:GridBoundColumn>
                                                    </Columns>
                                                    <PagerStyle PageSizeControlType="None" />
                                                </MasterTableView>
                                                <FilterItemStyle ForeColor="#333333" />
                                                <PagerStyle PageSizeControlType="None" />
                                            </telerik:RadGrid>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </telerik:RadAjaxPanel>
                        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="300">
                        </telerik:RadAjaxLoadingPanel>
                    </td>
                </tr>
            </table>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>






Shinu
Top achievements
Rank 2
 answered on 06 May 2014
3 answers
186 views
Hi,
    Problem with the opening of radwindow inside a Radmultipage
    My Scenario is as follows :-
    There is a Mypage.aspx that extends a predefined MasterPage.
     Inside Mypage.aspx I have a RadTabstrip which has 4 tabs, for each of the tab I have 
     Radmultipage dedicated to the tab.
     Inside radpageview I have gridview that contains a Commanditem in the form of asp link button;
     On the click of this Button I want to open a Radwindow that is declared in the same content page.
     
     same code to open a radwindow onclick of someButton is working on other pages but for this page its not working.

  so plz help me in this regard and let me know how to open the radwindow inside a radPageview .


With Regards
Adesh Sachan
Shinu
Top achievements
Rank 2
 answered on 06 May 2014
3 answers
153 views
Hello,
I am trying to upgrade from, I believe, Q3 2010 to the latest version Q1 2014. I have made everything work except one place where I have the grid in edit mode with a checkbox column wired to auto post back. When I click on the checkbox, the grid disappears. I have created a small test project to replicate this behavior and hoping you guys can help me resolve this issue. This scenario is working just fine with the old version.

Below is the test code I have created to replicate this issue.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridTest.aspx.cs" Inherits="RadGridTest.GridTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<h1> Rad Grid Test</h1>
<hr/>
<br /><br />

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns ="false" AllowMultiRowEdit="true" OnItemCreated="RadGrid1_ItemCreated" OnPreRender="RadGrid1_PreRender">

<MasterTableView EditMode="InPlace" DataKeyNames="AuditId, CheckId">

<Columns>
<telerik:GridBoundColumn UniqueName="AuditId" HeaderText="AuditId" DataField="AuditId" ReadOnly="true" Display="false" />
<telerik:GridBoundColumn UniqueName="CheckId" HeaderText="CheckId" DataField="CheckId" ReadOnly="true" Display="false" />
<telerik:GridCheckBoxColumn UniqueName="CompletionStatus" HeaderText="Status" DataField="CompletionStatus"/>
<telerik:GridBoundColumn UniqueName="Check" HeaderText="Check" DataField="Check" ReadOnly="true" />
<telerik:GridBoundColumn UniqueName="Comments" HeaderText="Comments (if any)" DataField="Comments"/>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</form>
</body>
</html>



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;

namespace RadGridTest
{
public partial class GridTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var audit = new Audit();
RadGrid1.DataSource = audit.Checks;
}
}

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
CheckBox chkbox = (CheckBox)item["CompletionStatus"].Controls[0];
chkbox.AutoPostBack = true;
chkbox.CheckedChanged += new EventHandler(chkbox_CheckedChanged);
}
}

void chkbox_CheckedChanged(object sender, EventArgs e)
{

}

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
RadGrid grd = (RadGrid)sender;
foreach (GridItem item in grd.MasterTableView.Items)
{
if (item is GridEditableItem)
{
GridEditableItem editableItem = item as GridDataItem;
editableItem.Edit = true;
}
}
grd.Rebind();
}
}

public class Audit
{
public int AuditId { get; set; }
public int CheckId { get; set; }
public bool CompletionStatus { get; set; }
public string Check { get; set; }
public string Comments { get; set; }

public List<Audit> Checks
{
get
{
var lst = new List<Audit>();
lst.Add(new Audit { AuditId = 1, CheckId = 1, CompletionStatus = false, Check = "Test1" });
lst.Add(new Audit { AuditId = 1, CheckId = 2, CompletionStatus = false, Check = "Test2" });
lst.Add(new Audit { AuditId = 1, CheckId = 3, CompletionStatus = false, Check = "Test3" });
return lst;
}
}
}
}




Thanks,

Zafar
Princy
Top achievements
Rank 2
 answered on 06 May 2014
1 answer
94 views
I am trying to use a GridDropDownColumn in a detail table, while using a DataSet as the source for the grid. I have a typed DataSet with one table for the MasterTableView, one table for the DetailTableView, and one table that should populate the drop-down list when editing a row in the DetailTableView. By the Telerik documentation, I need to set the DataSource for the DetailTableView during the DetailTableDataBind event (as laid out here:
http://www.telerik.com/help/aspnet-ajax/grid-hierarchical-data-binding-using-detailtabledatabind.html ).

The DetailTableView displays correctly. However, when I try to edit the DetailTableView, I get a DataBinding error because now the DataSource for the GridDropDownColumn is the collection of rows set up by the instructions for "Binding detail tables using DataTable.Select" or "Binding detail tables using a filtered DataView". In either case, the GridDropDownColumn does not look to the parent DataSet, but to that specific collection.

Example: Table A has the columns 'MasterID' and 'Name'. Table B has the columns 'MasterID' 'OrderID' and 'Salesman'. Table C has the columns 'ItemID' and 'ItemName'. Table A is the table for the MasterTableView. Table B is the table for the DetailTableView, using DataTable.Select to return the rows from table B that are relevant. I want to make a drop-down list that will let me join 'OrderID' in the DetailTableView to the 'ItemID' column in table C, allowing me to select anything from table C to set the 'OrderID' value in table B. How can I do this?

Peter
Top achievements
Rank 1
 answered on 05 May 2014
1 answer
94 views
Hello,

I'm currently working on a project with RadGrid.
The width of the grid needs to be exactly as the width the page. 

The Grid uses Ajax and wrapped with Div(#gridContainer).
I have defined the width of the grid like this with JS: 
$("#gridContainer .RadAjaxPanel").width(window.innerWidth);


The grid width is the same size as the window browser's width.
However, because the grid has many columns and an horizontal scroll-bar, the containing aspx Page also has a scroll-bar.
It seems that the page's width is as the grid's overall width (as it would be displayed without any horizontal scrolling).

How do I set the grid so that the dimensions of page will remain 100% and not exceed beyond?

Thanks,
Daniel.
Niko
Telerik team
 answered on 05 May 2014
1 answer
136 views
I'm new to Telerik controls and ajax as a whole so please forgive my ignorance.  I've done a lot of searching on this error but the solutions I have found don't quite seem to fit my situation.

I have a complicated scenario and I'm only involved in a piece of it.  My usercontrol is being called by another developer's aspx page so I'm limited to what I can do on the page itself.

The aspx page has a RadGrid (rgDetails), each row of rgDetails has a RadMultiPage (RadMultiPage1). 

Now here's where my usercontrols comes in.  One RadPageView in RadMultiPage1 contains my ucNoteTab.ascx which has a RadMultiPage (NotesMultiPage) control on it.  The each RadPageView in NotesMultiPage contains my final usercontrol (ucNotePreview.ascx).  It is in ucNotePreview that I'm having the trouble.  ucNotePreview has a textbox and a few buttons that change the properties and content of the textbox.

Here's the problem:  I can't do a postback to the server...there are too many pageloads that stuff gets too messed up.  I need to us an ajax update panel and trigger the button click events inside that so the buttons can work their magic on the textbox without a postback.  However, I get a "Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID" error when I try to implement asp:UpdatePanel on ucNotePreview.

Here's a diagram of the heirarchy of the controls if that helps:
Details.aspx (developed by another programmer)
-> RadGrid (rgDetails) 
--> RadMultiPage (RadMultiPage1)
---> ucNoteTab.ascx   (Start of my code)
----> RadMultiPage (NotesMultiPage)
-----> ucNotePreview.ascx
------> UpdatePanel (NotePreviewUpdatePanel)
-------->  Here's where it fails 

I'm sorry I can't really post code because it's all over the place and hard to summarize.  Any thoughts based on this convoluted description?
Marin Bratanov
Telerik team
 answered on 05 May 2014
1 answer
209 views
Hi,
i want to validate my radgrid on server side when the user click the "Add new record" btn,
if existing data are valid continue and show the editform else show error message and cancel insert operation,
so, my question is : what is the event i should use.
thanks.
Said
Top achievements
Rank 1
 answered on 05 May 2014
4 answers
153 views
I have a rendering issue with RadToolBarSplitButton on Mac and iPad (see ResourceButton.png attachment) where the button overflows its border by a few pixels on the right hand side, but this happens only on Macs and on iPads in Safari when we click the button to make it dropdown and reveal the subitems. We have no problems with this on windows machines in all the browsers we've tested. How can I fix this? I'm using telerik version 2013.2.717.40 and runtime version v4.0.30319.

Thanks,

Dylan
Dylan
Top achievements
Rank 1
 answered on 05 May 2014
1 answer
99 views
I am trying to add a button the the user can click on that will grab values from the row and then add to the cart. I would like this to confirm with the radwindow or radalert so the user is not taken to a new page and they can add items quickly.  How do I do this?

Currently I have it setup to where a the code-behind will go through each row and look at the qty field and then add the rows that have a qty > 0  

For Each dataitem As GridDataItem In RadGrid1.Items
          If DirectCast(dataitem.FindControl("qtytxt"), TextBox).Text > "" Then
              Try
                  Dim UOM As DropDownList = DirectCast(dataitem.FindControl("UOM_DDL"), DropDownList)
                  Dim qty As String = DirectCast(dataitem.FindControl("qtytxt"), TextBox).Text
                  Dim item As GridDataItem = TryCast(dataitem, GridDataItem)
                  Dim item_id As String = RTrim(item("item_id").Text)
                  Dim FindForm As FormView = CType(dataitem.FindControl("FormView3"), FormView)
                  Dim UnitPrice As Label = CType(FindForm.FindControl("Unit_Price"), Label)
                  Dim linecount As String = GetLineCount()
 
                   
                  nCMD.CommandText = "*****************"
                  nConn.Open()
                  nCMD.ExecuteNonQuery()
                  nConn.Close()
              Catch ex As Exception
                  Session("error") = ex.ToString()
                  Response.Redirect("Cart.aspx?error=" & ex.ToString)
              End Try
 
 
          End If
      Next
Corey
Top achievements
Rank 1
 answered on 05 May 2014
3 answers
142 views
Hi,

how to update the item when i press the enter key from the key board if the item is in edit mode and has some text boxes to enter.

need navigation between the text boxes when i press the enter key and then update the item, if  item is in edit mode.

could you please provide me the some solution for the above issue.

navigation between the text boxes and update the item when i press the enter key 

Thanks,
Tatarao .N

Princy
Top achievements
Rank 2
 answered on 05 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?