Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
48 views
Hi,

I came accross this issue with the Hierarchial Radgrid, that when the grid data is grouped by a particular column and exported to the Excel sheet, the Child table rows are not exported properly. For all the subesquent parent rows, only the child table rows of the first parent row is repeated.

Do anyone have a solution to this issue. I am using ChildLoadMode.ServerBind before exporting.

Thanks,
Manish
Marin
Telerik team
 answered on 21 Oct 2010
2 answers
122 views
I have a rad grid that I am using the needdatasource event to populate.
I have a linq query that returns a set of information.
I refered to this link for aid: http://www.telerik.com/help/openaccess-orm/openaccess-tasks-howto-execute-query-anonimous-type.html
When I run my code I get an ugly error:
"

DataBinding: 'System.Data.Linq.SqlClient.ObjectReaderCompiler+Group`2[[<>f__AnonymousType1`4[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], TIPWebIT, Version=2010.1.415.0, Culture=neutral, PublicKeyToken=null],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' does not contain a property with the name 'ItemNumber'.

"

Here is the grid:

 

 

 

<telerik:RadGrid ID="RadGridInventory" runat="server" AllowPaging="True" AllowSorting="True"
          GridLines="None" OnNeedDataSource="RadGridInventory_NeedDataSource" 
          AutoGenerateColumns="False">
          <MasterTableView CommandItemDisplay="None">
              <CommandItemSettings ExportToPdfText="Export to Pdf" />
              <Columns>
                  <telerik:GridTemplateColumn DataField="ItemNumber" HeaderText="Product Number" SortExpression="ItemNumber"
                      UniqueName="ItemNumber">
                      <ItemTemplate>
                          <asp:Label ID="ItemNumberLabel" runat="server" SkinID="EditForms" Text='<%# Eval("ItemNumber") %>' />
                      </ItemTemplate>
                  </telerik:GridTemplateColumn>
                  <telerik:GridTemplateColumn DataField="ItemName" HeaderText="Product" SortExpression="ItemName"
                      UniqueName="ItemName">
                      <ItemTemplate>
                          <asp:Label ID="ItemNameLabel" runat="server" SkinID="EditForms" Text='<%# Eval("ItemName") %>' />
                      </ItemTemplate>
                  </telerik:GridTemplateColumn>
                  
              </Columns>
          </MasterTableView>
      </telerik:RadGrid>

Here is the linq to sql statement that is used to populate the grid:
protected void RadGridInventory_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
       {
           TIPWebITLibrary.DAL.TIPWebITDataContext DC = new TIPWebITLibrary.DAL.TIPWebITDataContext();
           var RoomInventory = (from items in DC.tblTechItems
                                join inventory in DC.tblTechInventories on items.ItemUID equals inventory.ItemUID
                                where inventory.EntityTypeUID == 2 && inventory.EntityUID == Convert.ToInt32(HiddenFieldEntity.Value)
                                group items.ItemNumber by
                                new { items.ItemNumber, items.ItemName, inventory.EntityTypeUID, inventory.EntityUID } into g
                                select g);
           this.RadGridInventory.DataSource = RoomInventory.ToList();
       }

Any ideas on what I am doing wrong here?


Here is the result set when I run my linq statement in LinqPAD:

Key=

{ ItemNumber = 1251341, ItemName = C510 Webcam, EntityTypeUID = 2, EntityUID = 1 }

ItemNumber

1251341

ItemName

C510 Webcam

EntityTypeUID

2

EntityUID

1

 

1251341

Key=

{ ItemNumber = 1251343, ItemName = MacBook, EntityTypeUID = 2, EntityUID = 1 }

ItemNumber

1251343

ItemName

MacBook

EntityTypeUID

2

EntityUID

1

 

1251343

1251343

Vasil
Telerik team
 answered on 21 Oct 2010
5 answers
98 views
Hi!
Is there any way to make custom configurations of formatting options in the toolbar?
For example, I would like the existing "Heading 2" (or a completely custom item) cause "Selected text" to be replaced with "<h2><span>Selected text</span></h2>" instead of just "<h2>Selected text</h2>".

Any input on this is appreciated.

/Dan
Dobromir
Telerik team
 answered on 21 Oct 2010
1 answer
57 views
I need to style the last item in the list differently than the other items in the List (needs a dropshadow)

Would you guys be able to add that as a feature request?

Steve
Yana
Telerik team
 answered on 21 Oct 2010
2 answers
69 views
I upgraded a project to the latest version 2010.2.929.35 and I had Radcombobox that when changed updated a grid with a Linqdatasource but now changing the combobox won't refresh the grid.  any thoughts on what may have happened?

this is in my masterpage
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <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 Path="Scripts/SessionKeepalive.js" />            
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>

 

 

 

this is the combobox
 

 

<telerik:RadComboBox ID="_Stage" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="_Stage_SelectedIndexChanged">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="Pre-Proposal" Value="Pre-Proposal" />
                        <telerik:RadComboBoxItem runat="server" Text="Proposal" Value="Proposal" />
                        <telerik:RadComboBoxItem runat="server" Text="Active" Value="Active" />
                    </Items>
                </telerik:RadComboBox>

 

 

 

grid header
 

 

<telerik:RadGrid ID="_opps" runat="server" DataSourceID="LinqDataSource1" 
            GridLines="None" AllowFilteringByColumn="True" AllowSorting="True" 
        Width="1600px" onitemdatabound="_opps_ItemDataBound" 
        onexcelmlexportrowcreated="RadGrid1_ExcelMLExportRowCreated" 
        onexcelmlexportstylescreated="RadGrid1_ExcelMLExportStylesCreated" 
        onitemcommand="_opps_ItemCommand"  
        onitemcreated="_opps_ItemCreated" >            
            <ExportSettings ExportOnlyData="True" IgnorePaging="True" 
                OpenInNewWindow="True">
                <Excel Format="ExcelML" />
            </ExportSettings>
<MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource1" 
                DataKeyNames="OPPORTUNITYID" UseAllDataFields="True">

 

 

 

 

LinqDatasource where parameters
 

<WhereParameters>
                    <asp:ControlParameter ControlID="_Stage" Name="STAGE" 
                        PropertyName="SelectedValue" Type="String" />
                    <asp:ControlParameter ControlID="_Type" Name="TYPE" 
                        PropertyName="SelectedValue" Type="String" />
                </WhereParameters>

 

I setup the ajax using

private object Content(string id)        
{            
   return Page.Master.FindControl(id);
}
protected void Page_Load(object sender, EventArgs e)
{
   AjaxManager.AjaxSettings.AddAjaxSetting(_opps, _opps);
   AjaxManager.AjaxSettings.AddAjaxSetting(_opps, _number);
}
Pavlina
Telerik team
 answered on 21 Oct 2010
10 answers
301 views
I am trying to get RadFilter to work.

I am building a DNN module with OpenAccess.

I have a basic RadGrid already on the page.  I added RadFilter and set the FilterContainer to point to my grid.  I also defined 2 simple fields to filter.

I keep getting this error though at runtime:

InnerException: Parameter cannot be null or empty. Parameter name: fieldName
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: Telerik.Web.UI.RadFilterDataFieldEditorCollection.RetrieveEditorForFieldName
StackTrace
Message: DotNetNuke.Services.Exceptions.PageLoadException: Parameter cannot be null or empty. Parameter name: fieldName ---> System.ArgumentException: Parameter cannot be null or empty. Parameter name: fieldNameat Telerik.Web.UI.RadFilterDataFieldEditorCollection.RetrieveEditorForFieldName(String fieldName)at Telerik.Web.UI.RadFilterSingleExpressionItem.SetupFunctionInterface(Control container)at Telerik.Web.UI.RadFilterExpressionItem.CreateFunctionalInterface()at Telerik.Web.UI.RadFilter.CreateFilterItems()at Telerik.Web.UI.RadFilter.CreateControlHierarchy()at Telerik.Web.UI.RadFilter.CreateChildControls()at System.Web.UI.Control.EnsureChildControls()at Telerik.Web.UI.RadFilter.RecreateControl()at Telerik.Web.UI.RadFilter.AddChildExpression(RadFilterGroupExpressionItem groupItem, Boolean isGroup)at Telerik.Web.UI.RadFilterCommandEventArgs.ExecuteCommand(Object source)at Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args)at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)at Telerik.Web.UI.RadFilterExpressionItem.OnBubbleEvent(Object source, EventArgs args)at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)--- End of inner exception stack trace ---

Sebastian
Telerik team
 answered on 21 Oct 2010
4 answers
252 views
Hello All,

I have a RadGrid and I have assigned HeaderStyle-CssClass="Font12px" and AllowSorting="true" but the font size is not set to 12px.
Suggest me how can I maintain the font size to the headers.
Mona
Top achievements
Rank 1
 answered on 21 Oct 2010
4 answers
401 views
Hi

I have a radToolbar using the Office2007 skin.  When hovering over the buttons a orange highlight appears.  For 1 of the buttons in my toolbar I dont want the orange background.

My button is as follows :

<telerik:RadToolBarButton commandName="status" HoveredCssClass="noHover" tooltip="Initial page state" PostBack="false" ImageUrl="/status_alert.png" />

I have CSS as follows :
<style>
.noHover {
background-image:none !important;
}
</style>

When viewed in browser the .noHover style is applied to my button but the orange background still appears.  How do i stop the orange hightlight appearing ?

Thanks in advance


Phil
Top achievements
Rank 1
 answered on 21 Oct 2010
1 answer
60 views
I'm trying to add the functionality to allow my users to drag a row from one GridTableView to another GridTableView in the same RadGrid.  How can I access the SourceTableView so that i can rebind that GridTableView like I can for the DestinationTableView?
Veli
Telerik team
 answered on 21 Oct 2010
1 answer
125 views
I have a web application that uses a master page and content pages. On several of the pages I am using the RadGrid Control and the RadAjaxManagerProxy control (the RadAjaxManager is on the master page). On one page in particular when the user clicks the form (html form tag) it triggers an event handler that causes a javascript error - "Microsoft JScript runtime error: Object doesn't support this property or method" - and calls the javascript function

Sys$WebForms$PageRequestManager$_matchesParentIDInList.


 

function

 

Sys$WebForms$PageRequestManager$_matchesParentIDInList(clientID, parentIDList) {

 

 

    for (var i = 0, l = parentIDList.length; i < l; i++) {

 

 

        if (clientID.startsWith(parentIDList[i] + "_")) {

 

 

            return true;

 

        }

    }

 

    return false;

 

}

 

On this page I have 3 RadGrids and if I remove the one with the following code evrything works fine.

 

<

 

telerik:RadGrid ID="gvExpenseAssignments" runat="server" AutoGenerateColumns="false" Height="570">

 

 

    <ClientSettings EnableRowHoverStyle="true">

 

 

        <Scrolling AllowScroll="true" ScrollHeight="550" UseStaticHeaders="true" />
    
</ClientSettings>

 

 

    <MasterTableView DataKeyNames="GL_Account_Template_Id" EditMode="InPlace" AllowMultiColumnSorting="false"

 

 

 

            TableLayout="Fixed" AllowNaturalSort="false" Width="99%">

 

 

 

        <Columns>

 

 

 

            <telerik:GridBoundColumn DataField="ItemsString" Visible="false" UniqueName="strHintItems"></telerik:GridBoundColumn>

 

 

 

            <telerik:GridBoundColumn DataField="GL_Account_Name" HeaderText="Account Name" ReadOnly="true" AllowSorting="true" HeaderStyle-Width="260"></telerik:GridBoundColumn>

 

 

 

            <telerik:GridButtonColumn Text="Hint" runat="server" CommandName="cmdHint" HeaderText="Account Items" ShowInEditForm="true" HeaderStyle-Width="65px" ItemStyle-Width="65px"></telerik:GridButtonColumn>

 

 

            <telerik:GridButtonColumn Text="Suggest" runat="server" CommandName="cmdSuggest" HeaderText="Mapping Assistant" ShowInEditForm="true" HeaderStyle-Width="65px" ItemStyle-Width="65px"></telerik:GridButtonColumn>

 

 

 

            <telerik:GridBoundColumn DataField="GL_Account_No" HeaderText="Linked Account No" UniqueName="lblAcctNo" ReadOnly="true" AllowSorting="true"></telerik:GridBoundColumn>

 

 

 

            <telerik:GridBoundColumn DataField="Cust_GL_Account_Name" HeaderText="Linked Account Name" UniqueName="lblAcctName" ReadOnly="true" AllowSorting="true"></telerik:GridBoundColumn>

 

 

 

        </Columns>

 

 

    </MasterTableView>

 

 

 

</telerik:RadGrid>

The whole aspx file is attached as an image file. I get the same behavior wether I data bind the grid or not. The issue that I have found is that clientID in the javascript function is a function and not a string so it contains no method startsWith. I have found a workaround that creates an anonomous function for startsWith -

 

Function.prototype.startsWith = function(){return false;};

 

 

but I would like to be able to find a mor permanent fix or what I am doing that is causing the error to begin with.

Thank you.

Veli
Telerik team
 answered on 21 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?