Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 views

I have the following scenario:

    1. Insert a table on the page http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx

    2. Apply the “telerik-reTable-2” style from the Table Properties

    3. right-mouse-click on any cell of the table and select Insert Row Below (also, it may be above)

Result:

    The row has some style, but the style of the table in general becomes different from “telerik-reTable-2” (ActualResult.png attached).

Expected Result:

    The table has the style, that was previously selected – “telerik-reTable-2” (ExpectedResult.png attached).


Rumen
Telerik team
 answered on 21 Mar 2013
1 answer
100 views
So I'm trying to use a RadGrid for displaying an object with nested Lists as properties. I have it in a user control so I'm declaring RadGrid in code-behind. The object is passed in through the user control's constructor, all of the data is contained in the object, there is no need for any lazy loading. The object is retrieved from MongoDB so there are no identity fields at any of the levels in the hierarchy (other than the database _id at the very top). So when looking at the demo "Grid - Creating Hierarchy Programmatically", I get stuck at creating GridRelationFields because, as far as my data is concerned, relations aren't necessary.

Does the RadGrid have functionality for using reflection to display the full details of the object I'm trying to bind to it? Is there some way around having to create GridRelationFields? Or will I have to make wrapper objects and programmatically generate and assign ID fields to get this to work?
Radoslav
Telerik team
 answered on 21 Mar 2013
9 answers
536 views
Is there a way to get event on client side when RadGrid lost focus? I need inform client of finishing row edit/insert action.
Vasil
Telerik team
 answered on 21 Mar 2013
1 answer
133 views
Hi, everybody!
I have a problem. I want get value column header when I selected row.
<script type="text/javascript">
    var maNV = null;
    var tenDVI = null;
    function rowSelected(sender, args) {        
        var MasterTableView = sender.get_masterTableView();
        var row = MasterTableView.get_selectedItems()[0];          
        maNV = MasterTableView.getCellByColumnUniqueName(row, "MA_DV");            
        tenDVI = MasterTableView.getCellByColumnUniqueName(row, "TEN_DV");            
        var strMA_CTO = maNV.innerHTML; 
        var strTen_DVi = tenDVI.innerHTML;
         
        Service_Test.Web_SELECT_MADVIQLY(strMA_CTO,strTen_DVi);           
         <%Session["CHILD_MADVIQLY"] = "OK";%>
    }
}
 
<div>
<telerik:RadGrid ID="rgdBieu5" runat="server" GridLines="None" AutoGenerateColumns="False"
                    ShowFooter="true" AllowMultiRowSelection="True" OnItemCommand="rgdBieu5_ItemCommand">
                     
                    <MasterTableView ClientDataKeyNames="MA_DV" EnableNoRecordsTemplate="true">
                     <NoRecordsTemplate>
                                Không có dữ liệu
                    </NoRecordsTemplate>
                        <Columns>
                            <telerik:GridBoundColumn HeaderText="Mã đơn vị" DataField="MA_DV" UniqueName="MA_DV" FooterText="Tổng"
                                HeaderStyle-Width="10%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"/>
                                <FooterStyle HorizontalAlign="Center" Font-Bold="true"/>
                            </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn HeaderText="Tên đơn vị" DataField="TEN_DV" UniqueName="TEN_DV"
                                HeaderStyle-Width="20%">
                                <HeaderStyle Width="20%" HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Left" />
                               
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn HeaderText="3 pha điện tử" DataField="KH_3PD" UniqueName="KH_3PD"
                                DataFormatString="{0:### ### ### ### ### ##0}" Aggregate="Sum" HeaderStyle-Width="10%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Right"/>
                                <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="true" EnableRowHoverStyle="true"
                        EnablePostBackOnRowClick="false">
                        <Selecting AllowRowSelect="true" />                       
                        <Scrolling AllowScroll="false" UseStaticHeaders="true" />
                        <ClientEvents OnRowSelected="rowSelected"/>
                    </ClientSettings>
                </telerik:RadGrid>
</div>

Have you any ideas? Thank you very much!
Princy
Top achievements
Rank 2
 answered on 21 Mar 2013
1 answer
104 views
The object structure I'm trying to bind to TreeList has nested Lists as properties, but no ID fields. Can I bind to the TreeList control in such a way that its structure matches the structure of my object without the need for setting the key properties?
Radoslav
Telerik team
 answered on 21 Mar 2013
3 answers
220 views
Folks, Using RadControls for ASP.NET AJAX Q1 2013 with VS 2010. I would like to conditionally hide certain filter items based on user rights. Example I have a session variable i.e. Session["UserRights"].

If Session["UserRights"] == "Supervisor" then show all available filter items in a GridDateTimeColumn, if not then available filter items in that column will be No Filter & Equal To.

Attached is my screen shot. Any help will be appreciated.

Thanks

gc_0620
Marin
Telerik team
 answered on 21 Mar 2013
1 answer
284 views

Hi, When i tried to bound a datatable, I am getting index out of bound error:

 Dim table As New DataTable()
            table.Columns.Add("CallID", GetType(Integer))
            table.Rows.Add(12345)
            table.Rows.Add(67890)
           dgCallSearch.DataSource =table
           bgCallSearch.databind()



<Telerik:RadGrid ID="dgCallSearch" runat="server" CssClass="DataGridTable" AutoGenerateColumns="false" Visible="true" OnNeedDataSource="dgCallSearch_NeedDataSource1">
<ItemStyle CssClass="DataGridItem"></ItemStyle>
<AlternatingItemStyle CssClass="DataGridItem"></AlternatingItemStyle>
<HeaderStyle CssClass="DataGridHeader"></HeaderStyle>
                                        <MasterTableView>
<Columns>
                                                <Telerik:GridBoundColumn DataField="CallID" HeaderText="ID">

                                                </Telerik:GridBoundColumn>
                                            </Columns>
</MasterTableView>

</Telerik:RadGrid>


Error Log:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at Telerik.Web.UI.GridColumnCollection.System.Web.UI.IStateManager.SaveViewState()
   at Telerik.Web.UI.GridTableView.GetStructureState()
   at Telerik.Web.UI.RadGrid.SaveTableViewStructure(ArrayList stateList, GridTableView tableView)
   at Telerik.Web.UI.RadGrid.SaveViewState()
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
   at System.Web.UI.Page.SaveAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at PSCU.CUScripter.Web.UI.BasePage.ProcessRequest(HttpContext context) in c:\Projects\CUScripter 3.0\v3.2.0\CUScripter.Common\Web\BasePage.cs:line 343
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Marin Bratanov
Telerik team
 answered on 21 Mar 2013
2 answers
127 views
Hi,

We have ASP.NET application that has master page that contains content page with master/detail grids. Master grid can be 1 while detail grids can be more. Detail grids are placed in separate rad tabs. In every grid we have context menu where from we start exporting grid data to Excel.

The handler for exporting is placed to master page.

The question is how can we get the reference of right grid in master page handler? For example, we have 1 master grid and 2 detail grids in 2 rad tabs below. We can click context menu option in first detail grid, but how do we know it's first detail grid?


Thank you in advance,

Goran
Goran
Top achievements
Rank 1
 answered on 21 Mar 2013
3 answers
199 views
I have a RadGrid that's using a RadImageColumn to display an image based on the value of a field in the data source, which is working perfectly fine.

However, when my datasource is bound to a collection of an interface type, I'm getting the error "Object does not match target type".

My classes are structures as follows:

interface I
{
    string ImageURL
}
class A : I
{
    string ImageUrl { get { ... } }
}
class B : I
{
    string ImageURL { get { ... } }
}

I'm binding to a datasource that is a collection of items of type I.  What appears to be happening is that when my datasource only contains records of either type A or only records of type B, the grid binds succesfully.  The problem seems to occur when I try to bind to a datasource that contains both types, and only occurs the first time it tries to bind to the second type.  Presumably this might also cause problems with abstract classes, or other derived properties.
Mathew
Top achievements
Rank 1
 answered on 21 Mar 2013
1 answer
91 views
Hi all,
 I have created a webusercontrol using rad combobox.It is working fine when I am using it in the same project. Once I have converted it into a custom control and used its dll in another project ,I can't access its items. If I use asp combobox, it is working fine in all scenario. Please provide me a solution to solve this issue.

Thank you
Abhilash
Abhilash
Top achievements
Rank 1
 answered on 21 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?