Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
103 views
I created a Hierarchy grid in my page with object data sources.. calling some static methods in the code behind..
When i run the code.. i see the little arrow indicating the rows are expandable.. but when i click on it .. it wont expands..
I did see the call being made to the selectmethod in ods2 (see below) with the proper parentid value..
(select method prototype is .. List<...> SelectDataForODS2(int ParentId) {} ).. there was even values returned .. but the rows wont expand.

What am i missing?

<telerik:RadGrid ID="....... DataSourceID="ods1">
<MasterTableView AutoGenerateColumns="False" DataSourceID="ods1" DataKeyNames="parentid"
                            EditMode="EditForms" AllowFilteringByColumn="False" AllowMultiColumnSorting="True">
            <DetailTables>
                                <telerik:GridTableView Name="..." runat="server" AutoGenerateColumns="False"
                                    DataKeyNames="childid" DataSourceID="ods2" Width="100%">
                                    <ParentTableRelation>
                                        <telerik:GridRelationFields DetailKeyField="parentid"
                                            MasterKeyField="parentid" />
                                    </ParentTableRelation>
                                    <Columns>........
........................................


Chris
Top achievements
Rank 1
 answered on 04 Oct 2013
0 answers
145 views
EDIT: Can close this issue. I found the troublesome css. For anyone else who was wondering, we had some input[textbox][disabled] css rules that were overriding the rcbInput settings.

Hello, we recently updated our Telerik controls to version Q2 2013. When we did so, the appearance of disabled RadComboBoxes changed across our entire application.

The issue is that you can see the outline of the input textbox even while the control is disabled. I've attached a screenshot to demonstrate.

I'm guessing it's a css issue, but I'm not sure how to set the styling for the internal textbox if it is.
Adam
Top achievements
Rank 1
 asked on 04 Oct 2013
2 answers
198 views
Hi,

I have a hierarchical  grid, which shows the list of Orders Closed for the Year > Month > Order Number fashion.
That is the first level grid will have the list of years which the orders are created in descending order. For e.g., 2013, 2012, 2011 etc
The second level grid will show the Months for the Orders created. For e.g., January, February, March etc..
The third level grid will show the Order Numbers. For e.g, 1000, 1001, 1002 etc. 
My grid ASPX code is as below:
<Telerik:RadGrid ID="rgYears" runat="server" AutoGenerateColumns="False" CellSpacing="0"
     Width="200px" GridLines="None" Skin="Office2007" Font-Names="Calibri,Arial" AllowSorting="true">
     <MasterTableView DataKeyNames="DateClosedYear" ShowHeader="false">
         <Columns>
             <Telerik:GridBoundColumn DataField="DateClosedYear" HeaderText="Year" UniqueName="DateClosedYear">
             </Telerik:GridBoundColumn>
         </Columns>
         <SortExpressions>
             <Telerik:GridSortExpression FieldName="DateClosedYear" SortOrder="Descending" />
         </SortExpressions>
         <DetailTables>
             <Telerik:GridTableView runat="server" Name="MonthDetails" DataKeyNames="DateClosedMonth"
                 Width="176px" NoDetailRecordsText="No Child Records" ShowHeader="false">
                 <Columns>
                     <Telerik:GridBoundColumn DataField="DateClosedMonthName" HeaderText="Month" UniqueName="DateClosedMonth">
                     </Telerik:GridBoundColumn>
                 </Columns>
                 <ParentTableRelation>
                     <Telerik:GridRelationFields DetailKeyField="DateClosedYear" MasterKeyField="DateClosedYear" />
                 </ParentTableRelation>
                 <DetailTables>
                     <Telerik:GridTableView runat="server" Name="OrderDetails" DataKeyNames="OrderNumber"
                         Width="143px" NoDetailRecordsText="No Child Records" ShowHeader="true">
                         <Columns>                                           
                             <Telerik:GridButtonColumn ButtonType="LinkButton" CommandName="SelectOrderNumber"
                                 DataTextField="OrderNumber" FilterControlAltText="FilterOrderNumber column" HeaderText="Order Number"  UniqueName="OrderNumber" SortExpression="OrderNumber" ShowSortIcon="false">
                             </Telerik:GridButtonColumn>
                         </Columns>
                         <ParentTableRelation>
                             <Telerik:GridRelationFields DetailKeyField="DateClosedMonth" MasterKeyField="DateClosedMonth" />
                         </ParentTableRelation>
                     </Telerik:GridTableView>
                 </DetailTables>
             </Telerik:GridTableView>
         </DetailTables>
     </MasterTableView>
 </Telerik:RadGrid>


I store the Order number when ever the user cilcks on it to see the details. But when the user comes back, I want to show him the last Order number he accessed which I could do with the below code.
'rgYears dataGrid is already databound
'Get all the Months and Years for Orders Closed
'The below section of the code is called at Page Load
Dim OrdersMonthYear = dHelper.OrdersClosedMonthYear(oNumber) 'Get the Month and Year of the last accessed Order
If (rgYears.MasterTableView.Items.Count > 0) Then
    Dim rgYearsItem As GridDataItem = rgYears.MasterTableView.FindItemByKeyValue("DateClosedYear", OrdersMonthYear.DateClosedYear)
    If Not IsNothing(rgYearsItem) Then
        rgYearsItem.Expanded = True
        Dim rgMonthsItem As GridDataItem = rgYearsItem.ChildItem.NestedTableViews(0).FindItemByKeyValue("DateClosedMonth", OrdersMonthYear.DateClosedMonth)
        If Not IsNothing(rgMonthsItem) Then
            rgMonthsItem.Expanded = True
            Dim rgOrdersItem As GridDataItem = rgMonthsItem.ChildItem.NestedTableViews(0).FindItemByKeyValue("OrderNumber", oNumber) 'Last Accessed Order Number from the table
            If (Not IsNothing(rgOrdersItem)) Then
                rgOrdersItem.Selected = True
            End If
        End If
    End If
End If

I am facing problems with the Expand Collapse. I need to Collapse all the expanded grids when the user clicks on Expand. If the last accessed Order Number is of the expanded Year > Month, I want that row to be selected.

For e.g., Order 1003 was closed on 2013 > July. So when I click August, July should be Collapsed and August Month should be shown. Also when I expand July, August should be closed,  July must be expanded and select the Order number 1003.
Angel Petrov
Telerik team
 answered on 04 Oct 2013
1 answer
176 views
I'm building menus in code.  I need to be able to set the menu item image, but the only way I see to do this is by providing a URL string.

The problem is that the images are embedded resources, not separate files on the file system.  So I would like to be able to do something like...

Assembly assembly = Assembly.GetExecutingAssembly();
Stream imageStream = assembly.GetManifestResourceStream(ResourceName);
                                     
menuItem.ImageUrl(or other property) = new Bitmap(imageStream);

Obviously that won't work.  Is there a way to do this by providing the image data directly rather than a URL to a file?
Marbry
Top achievements
Rank 1
 answered on 04 Oct 2013
2 answers
78 views
I'm using the bar chart.  My current dataset has 8 entries in it, dates in the range of Sept 2nd through Oct 2nd.  When I display the chart I expect there to only be 8 sets of bars.  Instead it is showing every date in between.  I don't want that.
Glenn
Top achievements
Rank 1
 answered on 04 Oct 2013
1 answer
132 views
Hi,

I have implemented a two level radmenu on our website and trying to render a secondary menu in case javascript is disabled on client's browser. I want this second menu to appear under the main menu only if javascript is disabled on the browser, so I am rendering this second radmenu inside <noscript> tag. It works fine as expected when javscript is disabled, and also works fine (menu doesn't appear) if javasript is enabled.
However, I get a javascript error (obviously when it's enabled) :
Error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element
By looking at the Call Stack of the browser's developers tool, I think it is due to the following script that gets rendered automatically by telerik on the page (I have trimmed down the syntax)

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadMenu, {"_childListElementCssClass":null,"_enableItemImagesPreloading":true,"_flow":0,"_skin...;
});

It is definitely something to do with radmenu inside <noscript> tag, as if I render it without this tag, and with javascript enabled on browser, everything works fine.

I am using IE 8 with compatibility mode turned on.

Thanks in advance

Kam
Dimitar Terziev
Telerik team
 answered on 04 Oct 2013
1 answer
262 views
Hello Telerik,
I am using telerik HTML charts. I am facing one issue to show Large Chart title in multiple lines. (Chart Title+ Sub Title). I am unable to get solution to show chart title in multiple lines. Initially I was using Rad Charts and this is very much possible with Rad Charts. 
So is there any way to split large chart title in multiple lines using telerik HTML charts?


Thanks,
Parimal
Marin Bratanov
Telerik team
 answered on 04 Oct 2013
35 answers
1.1K+ views
Hello everyone,

Can some one please help in solving this issue, I have a radgrid and using automatic updating/deleting/inserting and also using "edit form" provided by the grid. I have 2 comboboxes in my editform that i would like them to be related to each other. One combobox is the country the other is "state/province" depending if ur in Canada or the US. So if u select the country then the other combobox gets filled with appropriate values. I have looked every where and can't find a solution.

Thanks in advance for any help.

Reda.
Shinu
Top achievements
Rank 2
 answered on 04 Oct 2013
2 answers
345 views
I have a grid and one of the cells is set as such

<rad:GridTemplateColumn AllowFiltering="False" UniqueName="EditLink" Groupable="false">
  <ItemTemplate>
    <a href="EditClient.aspx?ClientID=<%# Eval("ClientID")%>">
       <img alt="Edit Client" border="0" src="" title="Edit Client" />
   </a>
 </ItemTemplate>
 <HeaderStyle Width="20px" />
</rad:GridTemplateColumn>

What I am trying to do is set the image source based on a value in the grid at run time.

I assume ItemDataBound is the way to go but how do I get down to the image of the anchor in the item template


Eric Klein
Top achievements
Rank 1
 answered on 04 Oct 2013
4 answers
209 views
After selecting a file for upload, is it possible to shorten the displayed filename?

So if a user selects veryveryverylongfilename.pdf, can I display

veryveryverylong...  [x remove]

but still save it as veryveryverylongfilename.pdf. I have a limited space where I have placed the control and if the filename is too long my formatting gets thrown off.



thnx
Peter
Top achievements
Rank 1
 answered on 04 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?