Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
103 views
Hi All,
            I am using RAD Grid v5.1.4 and would like to get the solution for my issue within the same version if possible.

My requirement is to use hirarchy feature of the grid to just 1st level,where by clicking on the row's '+' sign want to show some notes attached with that row in hierarchy row(just single field of notes).
and that is working with the version (5.1.4) i am using.now my requirement is that i want to collapse/hide all the rows's notes by clicking on the header row's '+/-' sign.

my 1st query is how to insert such +/- sign for collapsing/hiding all the row's hierarchy? as it was'nt available on the examples i show for hierarchy functionality.

i seen in client mode hierarchy example to expand 1st row's hierarchy by javascript code as below
 function ExpandCollapseFirstMasterTableViewItem()  
        {  
            debugger;  
            var firstMasterTableViewRow = document.getElementById("<%= RadGrid1.MasterTableView.ClientID %>").get_dataItems()[0];  
            if(firstMasterTableViewRow.get_expanded())  
            {  
                firstMasterTableViewRow.set_expanded(false);  
            }  
            else  
            {  
                firstMasterTableViewRow.set_expanded(true);  
            }  
        } 

but the code was not working with the grid version i have,
so my 2nd query is can any one suggest me parallel functions for my current grid version(5.1.4) please?

For helping further assistance,please look at the image from below link,which shows my exact requirement.

http://www.elanemerging.com/Projects/gTicket/Grid_Requirement.jpg

Thanks in advance,
Amit Champaneri
Sebastian
Telerik team
 answered on 24 Oct 2008
1 answer
188 views
Hi,

I am getting following error when i try to sort the grid.

Actually, the sort expression is different from the columnname.

ex:
e.Column.HeaderText = "FLD_1"
e.Column.SortExpression="Agreement"

Is it possible to have the sortexpression and headertext with 2 differents names?

Please help me and following is the error i am getting... 

Server Error in '/FSNET' Application.

Cannot find column Agreement Reference.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: Cannot find column Agreement Reference.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[IndexOutOfRangeException: Cannot find column Agreement Reference.]
   System.Data.DataTable.ParseSortString(String sortString) +1799673
   System.Data.DataView.CheckSort(String sort) +28
   System.Data.DataView.set_Sort(String value) +131
   Telerik.Web.UI.GridEnumerableFromDataView.PerformTransformation() +4496
   Telerik.Web.UI.GridEnumerableFromDataView.TransformEnumerable() +33
   Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray) +156
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +330
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +502
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +59
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
   Telerik.Web.UI.GridTableView.PerformSelect() +23
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
   Telerik.Web.UI.GridTableView.DataBind() +321
   Telerik.Web.UI.GridSortCommandEventArgs.ExecuteCommand(Object source) +271
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +171
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +57
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +147
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Many Thanks,
Shashi
Princy
Top achievements
Rank 2
 answered on 24 Oct 2008
3 answers
54 views
Hi,
I am using alphabetic pager in a project. I want the letters to be on top of the grid instead in bottom of the grid. Is there any way to set a property in a grid. Any help is appreciated.

Thanks in advance,
Hari
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2008
1 answer
97 views
Hello

I want to add ,delete and update the products in server side?,please advice


Thanks
Mani
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2008
1 answer
336 views
Hi there,

I have a page where the grid is being created dynamically at the Page_Init stage. I am using the DataKeyNames property in order to specify the fields whose key values are to be saved, but this property seems to have no effect when using Javascript to obtain the values client-side. A view of the page source in the browser reveals that the client script that is normally generated containing the values isn't generated in this case.

I've been able to replicate the problem with a simple test page, the code of which is posted below. Maybe I'm doing something wrong?

Thanks,
Mark

ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestProgrammaticRadGrid.aspx.cs" Inherits="Test_TestProgrammaticRadGrid" %> 
<%@ 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></title
    <telerik:RadCodeBlock runat="server"
    <script language="javascript" type="text/javascript"
        function TestButton_onclick() 
        { 
            var radGrid = $find('<%=TestRadGrid.ClientID %>'); 
            var rows = radGrid.get_masterTableView().get_dataItems(); 
            alert('# items: ' + rows.length); 
            alert('first PK: ' + rows[0].getDataKeyValue('ID')); 
        } 
      
    </script> 
    </telerik:RadCodeBlock> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        <asp:PlaceHolder ID="GridPlaceholder" runat="server" />        
         
        <input type="button" id="TestButton" value="Click Here" onclick="return TestButton_onclick();" /> 
    </div> 
    </form> 
</body> 
</html> 
 

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; 
 
public partial class Test_TestProgrammaticRadGrid : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!IsPostBack) 
            PopulateGrid(); 
    } 
 
    private void PopulateGrid() 
    { 
        List<TestData> list = new List<TestData>(); 
         
        for (int i = 0; i < 11; i++) 
            list.Add(new TestData(i, "test " + i.ToString())); 
 
        TestRadGrid.DataSource = list; 
        TestRadGrid.DataBind(); 
    } 
 
    protected void Page_Init(object sender, EventArgs e) 
    { 
        DefineGridStructure(); 
    } 
 
    private void DefineGridStructure() 
    { 
        TestRadGrid = new RadGrid(); 
         
        TestRadGrid.AutoGenerateColumns = false
 
        InitializeProblemGrid(TestRadGrid); 
 
        AddCenteredColumn(TestRadGrid, "ID""ID""ID"); 
        AddCenteredColumn(TestRadGrid, "Name""Name""Name"); 
 
        GridPlaceholder.Controls.Add(TestRadGrid); 
 
    } 
 
    private void InitializeProblemGrid(RadGrid radGrid) 
    { 
        radGrid.MasterTableView.DataKeyNames = new string[] { "ID" }; 
        radGrid.ClientSettings.Selecting.AllowRowSelect = true
    } 
 
    private void AddCenteredColumn(RadGrid radGrid, string uniqueName, string headerText, string dataField) 
    { 
        GridBoundColumn column = new GridBoundColumn(); 
        column.UniqueName = uniqueName; 
        column.HeaderText = headerText; 
        column.DataField = dataField; 
        column.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; 
        column.ItemStyle.HorizontalAlign = HorizontalAlign.Center; 
        radGrid.MasterTableView.Columns.Add(column); 
    } 
 
 
    private RadGrid _TestRadGrid; 
    protected RadGrid TestRadGrid 
    { 
        get { return _TestRadGrid; } 
        set { _TestRadGrid = value; } 
    } 
 
 
public class TestData 
    public TestData(int id, string name) 
    { 
        _ID = id; 
        _Name = name; 
    } 
 
 
    public int ID 
    { 
        get { return _ID; } 
        set { _ID = value; } 
    } 
 
    public string Name 
    { 
        get { return _Name; } 
        set { _Name = value; } 
    } 
 
 
    private int _ID; 
    private string _Name; 
 


Shinu
Top achievements
Rank 2
 answered on 24 Oct 2008
0 answers
89 views
how do i expand the timeout session on the grid? i ahve already set the time to everything else. thank you
appdev
Top achievements
Rank 1
 asked on 24 Oct 2008
6 answers
3.2K+ views
Dear Telerik Support Team,

I have some decimal number on one column, but when it is smaller than 1 (such as 0.014836583), the display value in the RadGrid is .014836583. How can I format it? I have try DataFormatString, but it fails.

Any help is highly appreciated!

Regards,
Alex
Alex Yung
Top achievements
Rank 1
 answered on 24 Oct 2008
2 answers
185 views
Dear Telerik Support Team,

Can rowspan apply to radgird after assign DataSource? (RadGrid.DataSource = DataTable)

Any help is highly appreciated!

Thanks,
Alex
Alex Yung
Top achievements
Rank 1
 answered on 24 Oct 2008
0 answers
76 views
I've got a GridHTMLEditorColumn in my Rad Grid with a number of other fields. When the grid is placed in edit mode and I tab from field to field to enter data I land on several hidden fields at the top of the GridHTMLEditorColumn. These seem to be in the same position that a toolbar might normal be positioned. After tabing through several of these fields positions I finally end up in the edit area of the GridHTMLEditorColumn.

 

I'm using the Q2 2008 build, dll's show product version 2008.02.0826.20.

--Mark

marksweat
Top achievements
Rank 1
 asked on 23 Oct 2008
1 answer
160 views
RadMenu works fine with asp:ScriptManager.

Then I try replacing the Microsoft with the Telerik. So I try telerik:RadScriptManager but RadMenu stops working - meaning that submenus NO longer appear.

I did not find sufficient documentation in the RadMenu pdf doc to explain the correct way to use telerik:RadScriptManager with or without telerik:RadAjaxManager. Is the latter necessary? Or is telerik:RadScriptManager sufficient? If it is sufficient, then what is the correct way to configure it so that RadMenu works properly?

Or do I just revert to using the Microsoft asp:ScriptManager?
Carl
Top achievements
Rank 1
 answered on 23 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?