Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
238 views
So I have a Grid with a MasterTableView that contains a DetailTable, and that DetailTable contains a DetailTable.  Everything is correct as far as layout indentation when it renders to the screen and when I export to pdf. But the problem is when I try to export to excel. When the spreadsheet opens the MasterTableView item is say 7 columns wide. The first DetailTable item is say 5 columns wide, and the second DetailTable items are 3 columns wide. And they appear like they are center aligned so it looks like an upside down pyramid.  My client does not like this and I have tried for hours now to figure out how to make the item indentations look like they do in the pdf and screen but with no luck.  Is there a setting or something to make the excel render correctly or is this a bug.  Below will be my grid markup, and I'll attach an image of the spreadsheet so you can see what it looks like.  Thanks for any help in this issue.


<telerik:RadGrid ID="RadGrid1" runat="server" ShowFooter="false" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="false" CellSpacing="5" AllowFilteringByColumn="false"> 
    <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
        <Pdf AllowAdd="false" AllowCopy="true" AllowModify="false" AllowPrinting="true" PageTitle="ESign Sent vs Sold" Title="ESign Sent vs Sold" PaperSize="A4" PageWidth="260mm" />
        <Excel Format="Html" />
    </ExportSettings>
    
    <ClientSettings AllowExpandCollapse="true">
        <Selecting AllowRowSelect="true" />
    </ClientSettings>

    <MasterTableView DataKeyNames="ParentID, ID" Name="DivisionTable" HierarchyLoadMode="Client" HierarchyDefaultExpanded="false" ClientDataKeyNames="ParentID, ID">
        <HeaderStyle Font-Bold="true" HorizontalAlign="Left" Wrap="false" />
        <ItemStyle Wrap="false" VerticalAlign="Middle" HorizontalAlign="Left" />
        <AlternatingItemStyle Wrap="false" VerticalAlign="Middle" HorizontalAlign="Left" />
        <FooterStyle Wrap="false" />

        <DetailTables>
            <telerik:GridTableView Name="RegionTable" DataKeyNames="ParentID, ID" ClientDataKeyNames="ParentID, ID" HierarchyLoadMode="Client" Width="100%" HierarchyDefaultExpanded="false" >
                <DetailTables>
                    <telerik:GridTableView Name="BranchTable" DataKeyNames="ParentID, ID" ClientDataKeyNames="ParentID, ID" HierarchyLoadMode="Client" Width="100%" HierarchyDefaultExpanded="false" >
                        <Columns>
                            <telerik:GridTemplateColumn UniqueName="Filler" ItemStyle-Width="25px" HeaderStyle-Width="25px">
                                <ItemTemplate> <span>&nbsp;</span> </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn UniqueName="Text" DataField="Text" SortExpression="Text" HeaderText="Branch" ItemStyle-Width="300px" HeaderStyle-Width="300px" />
                            <telerik:GridBoundColumn UniqueName="SentCount" DataField="SentCount" SortExpression="SentCount" HeaderText="ESign Sent" ItemStyle-Width="150px" HeaderStyle-Width="150px" />
                            <telerik:GridBoundColumn UniqueName="SoldCount" DataField="SoldCount" SortExpression="SoldCount" HeaderText="Sold w/ ESign"  />
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Text" DataField="Text" SortExpression="Text" HeaderText="Region" ItemStyle-Width="300px" HeaderStyle-Width="300px" />
                    <telerik:GridBoundColumn UniqueName="SentCount" DataField="SentCount" SortExpression="SentCount" HeaderText="ESign Sent" ItemStyle-Width="150px" HeaderStyle-Width="150px" />
                    <telerik:GridBoundColumn UniqueName="SoldCount" DataField="SoldCount" SortExpression="SoldCount" HeaderText="Sold w/ ESign"  />
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn UniqueName="Text" DataField="Text" SortExpression="Text" HeaderText="Division" ItemStyle-Width="300px" HeaderStyle-Width="300px" />
            <telerik:GridBoundColumn UniqueName="SentCount" DataField="SentCount" SortExpression="SentCount" HeaderText="ESign Sent" ItemStyle-Width="150px" HeaderStyle-Width="150px"   />
            <telerik:GridBoundColumn UniqueName="SoldCount" DataField="SoldCount" SortExpression="SoldCount" HeaderText="Sold w/ ESign"  />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Daniel
Telerik team
 answered on 01 Jun 2012
1 answer
117 views
Does anyone have any experience or seen any reports about the usability implications of using Dock in their web applications? My partner and I are designing an app, but disagree about the use of dockable windows.  Our users, are not technical people, but rather "regular" business people.

He wants our users to have the ability the customise their interface - a nice goal - however, I'm concerned that for non technical people it could be too confusing, and may make support much more complex.

Thanks for any insights you may have in advance!
Slav
Telerik team
 answered on 01 Jun 2012
6 answers
455 views
Is it possible to create a customer popup form for inserting and editing entries in Grid?
I prefer the look of popup edit forms vs. the inline. But all of the demo's ive seen for using a custom form appear to only show inline editing.

Thank you,
Joe
Top achievements
Rank 2
 answered on 01 Jun 2012
1 answer
239 views
Hello,

I am using this control for the first time. I have couple of questions.
1) RadDatepicker textbox is allowing alphabets and special characters to enter. Is thery anyway that we can restrict not to enter alphabets and special characters
2) How to Enable dates from today only ? I dont want to user to select dates back from today.

TIA
Princy
Top achievements
Rank 2
 answered on 01 Jun 2012
2 answers
130 views
Hi team,

I need you help, i need know how to enabled/Disabled a RadNumericTextBox1 in the grid but from c#????

rewards
Hugo
Top achievements
Rank 1
 answered on 01 Jun 2012
6 answers
119 views
Hi, 

I created a date range filter template in the grid and i would like to check the date range whether it is larger than a year or not when user click on the button on RadToolBar to do the export. The system should allow user to select the date range larger than a year if they only view the data on screen but not doing the export. How can i get the value in the datepicker in the filter template in the javascript?

javascript coding as below (seem TryCast(Container,GridItem) cannot reference to the datepicker in filter template)

    function OnClientButtonClickingHandler(sender, eventArgs) {
        if (eventArgs.get_item().get_value() == "Excel") {
            var startDate = $find('<%# TryCast(Container,GridItem).FindControl("dfFromDate").ClientID %>');
            var endDate = $find('<%# TryCast(Container,GridItem).FindControl("dfToDate").ClientID %>');
            //alert(startDate.get_selectedDate())
            var NoOfMonth = DateDiff.inMonths(startDate, endDate);


            if (NoOfMonth >= 6) {
                alert('Please select the date range within  A YEAR for export purpose!');
                eventArgs.set_cancel(true);
            }
        }
    }   

Thanks.

Cheers, 
Nelson
Nelson
Top achievements
Rank 1
 answered on 01 Jun 2012
5 answers
112 views

Scenario: A RadGrid is populated on the client side using JavaScript calls to Web services after the page finishes loading. The grid starts out empty on the server side. The only notable problem I see is that table cell styles are not applied to new rows after increasing the page size in the NextPrevNumericAndAdvanced pager. An example table cell style is cell alignment. The original rows might have cells with align="right" attributes, but all the new rows that get added after increasing the page size have plain td tags with no attributes, making the grid look unusual. My current fix is to hide that page size control, but I would like to get this working.

 

What seems to happen is that an empty grid is created with the proper td attributes, but the empty grid does have enough blank rows to match the new larger page size.

 

For example, start with a page size of 3, a blank 4 row grid is created then populated with data, with the last row being removed. I think the extra row is for the optional footer, which the grid does not have. Change the page size to 10. After the postback, a blank 4 row grid is created, then populated with 10 rows, which properly expands the visible rows to 10, but the last six rows lack formatting attributes.

 

I’m not sure the best way to handle this issue.

Mike Chabot
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
123 views
Hi, I have a grid setup with grouping enabled.  I also have clientsettings enablerowhoverstyle="true" the rest is just the basics.

On the grid I want all rows bg to be white.
If I change the following setting AlternatingItemStyle-BackColor="White" the rowhoverstyle does not work properly.
on every second row it appears as it should and on the others the hover style only covers half the height of the row.

This happens regardless of it an item is grouped or if the grid is in ungrouped mode.
I am not sure if this is a bug or my error so I will start my post here.

I have attached a screen shot for example.

If you require code I will post.

Thanks
Michael
Heath
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
215 views
Hi,

We are tring to customize the key-press behaviors on a RadGrid. The example of the RadGrid and the JavaScript code  shown below. What we want is to cancel scrolling and make the next cell in edit mode when a user press the arrow down key. Is that any way to allow me to do so? Please help!

<telerik:RadGrid runat="server" ID="radgrid" ...>
  <MasterTableView TableLayout="Fixed">
       <Columns>...</Columns>
  </MasterTableView>
  
  <ClientSettings>
     <Scrolling AllowScroll="true" UseStaticHeaders="true" />
     <ClientEvents  OnKeyPress="keyPress" />
  </ClientSettings>
</telerik:RadGrid>
 
 
        oldScrollTop  = 0;
 
        function keyPress(sender, args) {
                var keyCode = args.get_keyCode();
 
                switch (keyCode) {
                    //If Down Key
                    case 40:
 
                        //set the scrolling position in propor
                        var scrollArea = document.getElementById(sender.get_element().id + "_GridData");
                         
                       //try to cancel the scrolling and it's not working
                       //sender.ClientSettings.AllowScroll = false;
                         
                       //try to set the scroll-area top position as same as the top of the first row,
                                //but scrollArea.scrollTop always be assigned to 53
                       scrollArea.scrollTop = 0;
                       break;
                }
        }

Anyway, I knew that we can use the paging stuff to avoid scrolling problem. However, we do want to have scrolling function on the Grid. 
Richard
Top achievements
Rank 1
 answered on 31 May 2012
4 answers
209 views
Hi,

I have a grid which contains a nested grid.  When the page loads I expand all the items by using <MasterTableView HierarchyDefaultExpanded="true"
When clicking the edit link on the parent grid all of the child grids vanish but the grid is still in an expanded state for all records.  The only way to get the child grids back is to click the Expand/Collapse on one row, then they all appear again.
What I would like to achieve is to be able to edit a parent record and keep all child grids visible for the other records.  Thanks for your help.
Sterlin Swan
Top achievements
Rank 1
 answered on 31 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?