Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hi.
I have a detail table grid. I want to have some of the rows expanded during the pageload itself. How can i get this?
Shinu
Top achievements
Rank 2
 answered on 06 May 2014
2 answers
105 views
Hi, I added RadNumeric textbox inside the edittemplate of radgrid, but this is not aligned properly where as samething for textbox works perfectly fine. Attached screenshot for reference . Please check

 <EditItemTemplate>
                          <table id="tbleditJan"  runat="server" >
                          <tr ><td >
                                     <telerik:RadNumericTextBox ID="tbJan"  CssClass="radnumeric" Skin=""  runat="server"> 
                                   </telerik:RadNumericTextBox>

                       </td>/tr><tr><td style="width:35px !Important">
                                 <telerik:RadNumericTextBox ID="tbJanYellow"   CssClass="radnumeric"  runat="server">                               
                                   </telerik:RadNumericTextBox>
                                         </td> </tr> </table><EditItemTemplate>

Styles:

.radnumeric {
     width:35px !important;
}

span.radnumeric .riContentWrapper,
    span.radnumeric.riContButton.riContSpinButtons .riContentWrapper
    {
        width: 35px !important;
        padding-right: 0;
        
    }
Princy
Top achievements
Rank 2
 answered on 06 May 2014
1 answer
311 views
Hi

     I have done Programmatically Binding to the RadOrgChart with DataTable . But i am not able to see the chart on UI. Below is my Code


            DataTable table = new DataTable();
            table.Columns.Add("ID", typeof(String));
            table.Columns.Add("Title", typeof(String));
            table.Columns.Add("AndOr", typeof(String));
            table.Columns.Add("ParentID", typeof(String));
            table.Columns.Add("Designation", typeof(String));

            table.Rows.Add("1", "John Smith", "", "4", "CEO");
            table.Rows.Add("2", "Joe Robert", "Or", "1", "Manager SLS");
            table.Rows.Add("3", "Jack Kent", "Or", "1", "Manager Mkt");
            table.Rows.Add("4", "Ravi Kumar", "Or", "2", "Engineer");
            table.Rows.Add("5", "Sue Raymond", "And", "2", "Engineer");
            table.Rows.Add("6", "Lisa simpson", "Or", "4", "Junior Engineer");
            table.Rows.Add("7", "Bob Woley", "", "5", "Junior Engineer");
            table.Rows.Add("8", "Ron Jones", "", "3", "CSR");
            table.Rows.Add("9", "Dave Mason", "Or", "3", "CSR");
            table.Rows.Add("10", "John Williams", "", "3", "CSR");

            objRadOrgChart.DataTextField = "Title";
            objRadOrgChart.DataFieldID = "ID";
            objRadOrgChart.DataFieldParentID = "ParentID";      
            objRadOrgChart.DataSource = table;
            objRadOrgChart.DataBind();

             This not Shows anything on Page . But when i remove DataFieldParentID  , It shows all records with chart . Please help how it wants the data to show the chart on Page
Princy
Top achievements
Rank 2
 answered on 06 May 2014
10 answers
477 views


Hi Princy

I have a requirement where I would like to bind my telerik:GridDropDownColumn to two
different data source based on Edit and Insert mode.

For example if I am inserting a record I would like to
bind my telerik:GridDropDownColumn
to a data source Name “Insertdatasource” and if it is in edit/update mode I
would like to bind the same telerik:GridDropDownColumn
to “Updatedatasource”.

The reason why I would like to do this as I do not want
to show the option which my user have already inserted inside my grid. When he
insert new row only those option will appear which are not already inserted.

I hope you understand my problem.

I look forward for your response soon

Thanks in advance

Syed Qazafi

Eyup
Telerik team
 answered on 06 May 2014
3 answers
336 views
Does anyone have a good example of how to add a user control in a gridtemplate column in a radgrid.
Shinu
Top achievements
Rank 2
 answered on 06 May 2014
1 answer
156 views
I'm developing a .NET 4.0 site in VS2010, running in IIS7.5 environment.Every forum I check says that my version of Telerik RadControls for ASP.NET AJAX (V.2012.1.411.40) should play nicely with the AjaxControlToolkit elements. My Toolkit version is 4.1.7.1213.I've tried to use RadScriptManager, but it blows up when it tries to `$create` the HoverMenuExtender control (at runtime) that I use within the RadGrid:
   
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="false" >
    <scripts>
    
<%--Needed for JavaScript IntelliSense in VS2010--%>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /><br>            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /><br>            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>

HoverMenuExtender inside RadGrid:   
<ajaxToolkit:HoverMenuExtender ID="HoverMenuExtender1" runat="server" PopupControlID="popupImage" TargetControlID="thumbnailImage" OffsetX="-10" OffsetY="-310" PopupPosition="Left" PopDelay="100" HoverDelay="50"><br></ajaxToolkit:HoverMenuExtender>


If I use this ToolkitScriptManager instead, my HoverMenuExtender control works, but none of the RadControls render correctly.   
<ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true" runat="Server" ID="RadScriptManager1">
        <Scripts>
          
<%--Needed for JavaScript IntelliSense in VS2010--%>
           
<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>
    </ajaxToolkit:ToolkitScriptManager>

Any thoughts?

thanks.
Eyup
Telerik team
 answered on 06 May 2014
3 answers
198 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
235 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
212 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
117 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
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?