Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
83 views
Hi,

I have seen grid hierarchy example from below link :
Grid / Hierarchy with Templates

Currently we have only collapse on left side of grid. If we click on expand then sending parameter to the child grid and showing data.

But I would like to show child grid from click on column based. That is If I click on 2 column in main grid then I want send parameter to nested view template grid and show data.

Is it Possible ?

Thanks in advance ..

Madhu Palakurthi
Top achievements
Rank 1
 asked on 10 Jan 2013
2 answers
380 views
Hi guys,
I have a gridboundcolumn:

<

 

 

telerik:GridBoundColumn HeaderText="Location" DataField="LOCATION" UniqueName="LOCATION" ReadOnly="true" SortExpression="LOCATION" HeaderButtonType="TextButton" >

 

 

 

<HeaderStyle Width="1px" />

 

 

 

<ItemStyle Width="1px" />

 

 

 

</telerik:GridBoundColumn>

 


I want to put some default value in html to show users how data will look like in the grid.For example:

<

 

 

telerik:GridBoundColumn HeaderText="Location" DataField="LOCATION" UniqueName="LOCATION" ReadOnly="true">31R050</telerik:GridBoundColumn>

Thanks so much for your help.

Shinu
Top achievements
Rank 2
 answered on 10 Jan 2013
2 answers
157 views
Hello Telerik Team,

Subject : We are facing an issue regarding Telerik Radgrid records limit.
Cause: Whenever datasource exceeds 20000 records, page gets crashed.

Please provide the resolution for this problem.

Thanks,
Preeti


preeti
Top achievements
Rank 1
 answered on 10 Jan 2013
5 answers
1.3K+ views
Hi,

Is there a way to insert a summary/total row at the end of the grid? I am not using any grouping. It is just a simple datatable being bound to the grid.

Thanks,
Saurabh
Shinu
Top achievements
Rank 2
 answered on 10 Jan 2013
1 answer
72 views
Hi,
I need to know when the BIFF excel export was added to RadGrid

Regards,
Martin
Princy
Top achievements
Rank 2
 answered on 10 Jan 2013
1 answer
251 views

Hi, I'm trying to pull just the node Values using a Linq query

IList<RadTreeNode> nodeCollection = RadTreeViewSearchItems.CheckedNodes;

var myvalues = nodeCollection.Select(n => n.Value);
or
var myvalues = nodeCollection.Select(n => n.Value).ToList();

returns...

Expression cannot contain lambda expressions

David
Top achievements
Rank 1
 answered on 10 Jan 2013
11 answers
93 views
Hello,

I have the toggle full screen icon and show text on my toolbar.  When I mouse over it some weird lines appear.  It looks correct when I remove the text.  This applies to FF17, Chrome 23 and IE 10.

This is the test page I'm using:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ztest6.aspx.vb" Inherits="ztest6" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<head runat="server">
    <title></title>
        
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sm1" runat="server"></asp:ScriptManager>
        <div style="width:600px;">          
             <telerik:RadEditor Skin="Default" ID="RadEditor1" runat="server" Width="100%" Height="300px" ToolsFile="~/includes/NoTools.xml">
            </telerik:RadEditor>
             
        </div>
    </form>
</body>
</html>

NoTools.xml
<?xml version="1.0" encoding="utf-8" ?>
<root
    <tools name="EnhancedEditToolbar" dockingZone="Top" dockable="true" enabled="true">
        <tool name="ToggleScreenMode" Text="Toggle Full Screen" ShowText="True" />       
    </tools>
</root>
Khanh
Top achievements
Rank 1
 answered on 09 Jan 2013
7 answers
164 views
I have an annoying white line in my grid on the CommandItemSettings line right beside my export to excel button.  Is there anyway of getting rid of it?

Here is my ASPX code

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenItemsInventory.aspx.cs"

 

 

Inherits="Sterling.SNEF.Tax.Web.OpenItemsInventory" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Open Items Inventory</title>

 

</

 

head>

 

<

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

var rad_val;

 

 

function onFutureInventory(sender, args) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = true;

 

 

GetRadioValue();

 

var windowURL = "FutureInventoryDialog.aspx?ViewByType=" + rad_val

 

 

var oWnd = $find("<%= dlgFutureInventory.ClientID%>");

 

oWnd.setUrl(windowURL);

oWnd.SetSize(470, 505);

oWnd.show();

oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.SetModal(

true);

 

 

}

 

 

function GetRadioValue()

 

{

message =

"";

 

surplusMessage =

"";

 

 

 

if (document.getElementById('<%= rdoAssignee.ClientID %>').checked)

 

{

rad_val =

"Assignee";

 

}

 

else

 

{

rad_val =

"State";

 

}

}

 

 

function onFutureInventoryClose(sender, eventArgs) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = false;

 

}

 

 

function onRequestStart(sender, args)

 

{

 

if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)

 

{

args.set_enableAjax(

false);

 

}

}

 

 

</script>

 

</

 

telerik:RadCodeBlock>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="OpenItemsInventoryScriptManager" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<ClientEvents OnRequestStart="onRequestStart" />

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="Panel1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadWindow ID="dlgFutureInventory" runat="server" Skin="Web20" EnableViewState="False"

 

 

KeepInScreenBounds="True" ReloadOnShow="True" ShowContentDuringLoad="False" VisibleStatusbar="False"

 

 

Behaviors="None" OnClientClose="onFutureInventoryClose" onclientOverlay="True">

 

 

</telerik:RadWindow>

 

 

<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Skin="Web20">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<asp:Panel ID="Panel1" runat="server">

 

 

<asp:Label ID="lblViewBy" runat="server" Font-Bold="True" Text="View By:" Font-Names="Arial"></asp:Label>

 

 

<asp:RadioButton ID="rdoAssignee" runat="server" Text="Assignee" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" Checked="true" AutoPostBack="true"

 

 

Font-Names="Arial" Font-Size="Smaller" />&nbsp;&nbsp;

 

 

<asp:RadioButton ID="rdoState" runat="server" Text="State" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" AutoPostBack="true" Font-Names="Arial"

 

 

Font-Size="Smaller" />

 

 

<br />

 

 

<br />

 

 

<div style=" border: thin solid #5177B5; left: 5px; position: relative; left: 5px; width: 760px;">

 

 

<table border="1" width="760px" style="border-collapse: collapse;">

 

 

<tr>

 

 

<td align="center" style="width: 145px; background-color: #7FA5D7;">

 

 

<asp:Label ID="lblhdrAssignee" runat="server" Text="Assignee" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label2" runat="server" Text="Jurisdictions" Font-Bold="True" Font-Names="arial,sans-serif"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label6" runat="server" Text="Prior Open Items" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label7" runat="server" Text="Current Open Items" Font-Bold="True"

 

 

Font-Names="Arial" Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 110px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label4" runat="server" Text="Items Left to Pay" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label5" runat="server" Text="% Complete" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="center" style="width: 150px;">

 

 

<asp:Label ID="Label1" runat="server" Text="Totals" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="Smaller" ></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrJurisdictions" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPrior" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrCurrent" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrItemsLeft" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPctComplete" runat="server"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Label ID="lblCurrentandPrior" runat="server" Font-Bold="True" Font-Size="Large"

 

 

Font-Names="Arial">Current and

 

Prior Inventory by Assignee

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<table>

 

 

<tr>

 

 

<td colspan="3">

 

 

<telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"

 

 

GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="770px" Height="265px"

 

 

OnNeedDataSource="grdCurrentandPrior_NeedDataSource">

 

 

<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True"

 

 

ExportOnlyData="true" >

 

 

<Excel Format="HTML" />

 

 

</ExportSettings>

 

 

<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false">

 

 

<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"

 

 

ShowRefreshButton="false" />

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="State" UniqueName="State" SortExpression="State"

 

 

Visible="false">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Jurisdictions" UniqueName="JurisdictionCount"

 

 

SortExpression="JurisdictionCount">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Prior Open Items" UniqueName="OpenItemsCountPrior"

 

 

SortExpression="OpenItemsCountPrior">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbPrior" runat="server" Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Current Open Items" UniqueName="OpenItemsCountCurrent"

 

 

SortExpression="OpenItemsCountCurrent">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbCurrent" runat="server" Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems"

 

 

SortExpression="TotalRemainingItems">

 

 

<HeaderStyle Font-Bold="True" Width="105px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="% Complete" UniqueName="clmPctComplete" SortExpression="PercentComplete">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:F2}%")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"

 

 

Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderStyle BorderStyle="Solid" />

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Button ID="btnFutureInventory" runat="server" Text="Future Inventory" SkinID="Web20"

 

 

OnClientClick="onFutureInventory(); return false;" Width="164px" UseSubmitBehavior="false" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 



Any help would be appreciated.

MBEN
Top achievements
Rank 2
Veteran
 answered on 09 Jan 2013
3 answers
146 views
Some days ago, I asked a question to remove the header row and making a label with the header text on the filter row, and switching to the filter when the label is clicked, and going back to the label when the textbox blurs.

The code to achieve that is:

C#
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridHeaderItem)
    {
        e.Item.Visible = false;
        e.Item.Display = false;
    }
    if (e.Item is GridFilteringItem)
    {
        GridHeaderItem header = RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
 
        GridFilteringItem filterItem = e.Item as GridFilteringItem;
        for (int i = 0; i < header.Cells.Count; i++)
        {
            Label label = new Label();
            label.Text = header.Cells[i].Text;
             
            if (filterItem.Cells[i].Controls.Count > 0)
            {
                TextBox textbox = filterItem.Cells[i].Controls[0] as TextBox;
                textbox.CssClass = "hidden";
 
                Button button = filterItem.Cells[i].Controls[1] as Button;
                button.CssClass = "hidden";
                 
                filterItem.Cells[i].Controls.Add(label);
 
                label.Attributes.Add("onclick", "showFilterItem('" + label.ClientID + "','" + textbox.ClientID + "','" + button.ClientID + "')");
                textbox.Attributes.Add("onblur", "hideFilterItem('" + label.ClientID + "','" + textbox.ClientID + "','" + button.ClientID + "')");
            }
        }
    }
}

Javascript:
<script type="text/javascript">
    //Put your JavaScript code here.
    function showFilterItem(labelID, textID, buttonID) {
        $get(labelID).className = "hidden";
        $get(textID).className = "visible";
        $get(buttonID).className = "visibleButton";
    }
    function hideFilterItem(labelID, textID, buttonID) {
        $get(labelID).className = "visible";
        $get(textID).className = "hidden";
        $get(buttonID).className = "hidden";
    }
 
 
</script>

CSS
<style type="text/css">
    .hidden
    {
        display: none !important;
    }
    .visible
    {
        display: "";
        margin-top: 0px;
        height: 10px;
    }
    .rcbArrowCell
    {
        display: none !important;
    }
    .rgFilterRow td
    {
        border-right: none !important;
    }
    .RadGrid .rgFilterRow .rcbInputCell
    {
        padding:0;
        border-width:0;
    }
    .visibleButton
    {
        display: "";           
        background-image: url('icon-filter.gif');
        height: 16px;
        background-repeat: no-repeat;
    }
 
</style>


But if I set the radgrid property AllowSorting to True, the label disappears, as the headercell does not contain any text (the label doesn't disappear, but its text is null). I know it is a hyperlink, but I cant get the href link with code behind.

How do I fetch the Sort function from the header cell, so I can put the function in a button right beside the label?
David
Top achievements
Rank 1
 answered on 09 Jan 2013
2 answers
106 views
Hi, 

When a telerik grid is loaded ,  the column headers and item width match and they are aligned properly. 
But when we click on header context menu and hide one column then there is a mismatch with columns.
If i set AllowStaticHeaders="false" it works fine but i want static headers. I assigned fixed width for each column using Header style width property and TabeleLayout is Fixed.

Is there anyway to fix the issue?

Thanks,
Nimmy
Nirmala
Top achievements
Rank 1
 answered on 09 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?