Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
84 views
Hi all,

Using VS 2010 with UI for ASP.NET AJAX Q1 2014. I am using Grid - Form Template Edit Form like this for both Master/Child Records:

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

My question is it possible as users are typing the values in attached, total values gets changed accordingly for Master/Child Grids, not after post back but as
they are entering/changing values.

Thanks for any help.

gc_0620
Top achievements
Rank 1
 answered on 03 Apr 2014
2 answers
101 views
I have a dilemma where we have a datasource that defines either a 'landscape' or 'portrait' item, each of these need its own template inside a grid (or other recommended control) that flows in the correct manner, see attached illustration.

In the example you can disregard the odd item on the first row, this is simply a 'hoover' effect that has nothing to do with the actual problem.
But as you can see there are two types of items, one landscape and one portrait to be able to show the correct images and still make it flow together with one another. Of course there might be cases where the last item is dropped if we have three landscape items in a row.

So, Is there any way to accomplish this? 
Suppose we need an Event that still hasn't bound the template and we can bind it to the correct template based on the item datasource.

Christian
Konstantin Dikov
Telerik team
 answered on 03 Apr 2014
2 answers
147 views

Hi,

I have a single sliding pane setup horizontally that is used like a quick search window. Is it possible to hide the tab when the user docks the pane using CSS?
I'm doing something like this in my CSS, please tell me what I'm missing...
<style type="text/css">
    .paneTabContainerExpandedHorizontal, rspSlidePane
    {
        /*visibility:hidden !important;*/
        display:none !important;
    }
    html, body, form
    {
        height: 100%;
        margin: 0px;
        padding: 0px;
        overflow: hidden;
    }
</style>

This is my html code:

<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" ></telerik:RadScriptManager>
         
        <script type="text/javascript">
            function PaneDockedHandler(sender, eventArgs) {
 
                var slidingZone = $find("<%= SpeedSearchSlidingZone.ClientID %>");
                var pane = slidingZone.getPaneById(slidingZone.get_dockedPaneId());
                if (pane) {
                    pane.hideTab();
                }
 
            }
        </script>
 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" width="100%" Height="100%">
             
            <telerik:RadPane ID="LeftPane" runat="server" Width="22px" Scrolling="None" >
                <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" Height="100%">
                    <telerik:RadSlidingPane ID="LeadSearchSlidePane" Title="Search Criteria" runat="server" width="150px">
                        <uc1:LeadSearchCriteria runat="server" ID="LeadSearchCriteria" />
                    </telerik:RadSlidingPane>
                    <telerik:RadSlidingPane ID="TreeListSlidePane" Title="Tree View" runat="server">
                        <uc2:LeadSearchTreeView runat="server" ID="LeadSearchTreeView" />
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
 
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" BorderWidth="1px" Width="1px" />
            <telerik:RadPane ID="RightPane" runat="server" >
                <telerik:RadSplitter ID="RadSplitter3" runat="server" Orientation="Horizontal" Width="100%" Height="100%">
 
                    <telerik:RadPane ID="SpeedSearchPane" runat="server" Scrolling="None" Height="22px">
                        <telerik:RadSlidingZone ID="SpeedSearchSlidingZone" runat="server" Height="22px">
                            <telerik:RadSlidingPane ID="SpeedSearchSlidingPane" Title="Speed Lead" runat="server"
                                   OnClientDocked="PaneDockedHandler" >
                                speed lead content
                            </telerik:RadSlidingPane>
                        </telerik:RadSlidingZone>
                    </telerik:RadPane>
 
                    <telerik:RadPane ID="LeadResultPane" runat="server" Scrolling="None">
                        content
                    </telerik:RadPane>
                </telerik:RadSplitter>               
            </telerik:RadPane>
        </telerik:RadSplitter>
    </form>
</body>
</html>

As you can see, I'm also trying to hide the tab using javascript by following this example here:

it hides the tab but leaves an empty space. If I use OnClientBeforeDock or OnClientDocking, slidingZone.get_dockedPaneId() returns null and wouldn't go to the hideTab statement.  I have attached a screen shot of the tab layouts.

Please tell me if it's possible to do this using CSS? If not, is there a way to get ride of the empty space besides messing with the width and height as done in the example above?

Thank you for your help~

Helen

 




Helen
Top achievements
Rank 1
 answered on 03 Apr 2014
11 answers
330 views
Hi,

I'm new in Telerik's grid and need help. I have 2 grid controls on ASPX page. The first one is populated with some data. I want to populate the second one when I select an item in first one.

The markup (in aspx) for second grid looks as follows:

            <telerik:RadGrid ID="grdDetails" runat="server" GridLines="Both" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false">
                <MasterTableView DataKeyNames="ID" Width="50%" TableLayout="Fixed">
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="Select">
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkDeleteAppItem" />
                            </ItemTemplate>
                            <HeaderStyle Width="10%" />
                        </telerik:GridTemplateColumn>
                        
                        <telerik:GridBoundColumn DataField="ID" HeaderText="ID">
                            <HeaderStyle Width="25%" />
                        </telerik:GridBoundColumn>
                        
                        <telerik:GridBoundColumn DataField="FN" HeaderText="FIRST NAME">
                            <HeaderStyle Width="25%" />
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="true" />
                    <Resizing AllowColumnResize="true" />
                </ClientSettings>
            </telerik:RadGrid>

The code behind (but not in direct aspx.cs file) looks like this:

        private static void OnGridRecordChanged(object sender, EventArgs e)
        {
            var viewFrameControl = sender as GridFrameControl;
            if (viewFrameControl == null)
            {
                throw new ParusException("Unable to get viewframecontrol!");
            }

            if (CacheInfoRequest.CacheRequest)
            {
                Dictionary<string, Person> dict = new Dictionary<string, Person>()
                {
                    { "1", new Person { FirstName = "Andrey", LastName = "Andreyev" }},
                    { "2", new Person { FirstName = "Sergey", LastName = "Sergeyev" }},
                    { "3", new Person { FirstName = "Igor", LastName = "Igorev" }},
                    { "4", new Person { FirstName = "Vladimir", LastName = "Vladimirov" }},
                    { "5", new Person { FirstName = "Oleg", LastName = "Olegov" }}
                };

                List<BindItem> list = new List<BindItem>();
                foreach (KeyValuePair<string, Person> dictItem in dict)
                {
                    BindItem bindItem = new BindItem();
                    bindItem.ID = dictItem.Key;
                    bindItem.FN = dictItem.Value.FirstName;
                    list.Add(bindItem);
                }

                Control ctrlParent = viewFrameControl.Parent;
                RadGrid grdDetail = ctrlParent.FindControl("grdDetails") as RadGrid;

                grdDetail.BackColor = Color.Green;

                grdDetail.DataSource = list;
                grdDetail.DataBind();
            }
        }

When I select the row in first grid, nothing happens.

I appreciate any help.

Thank you in advance.

Goran
Matthew
Top achievements
Rank 1
 answered on 03 Apr 2014
5 answers
498 views
Hi

Is it possible to perform a SUM aggregate on a field of type TimeSpan? When I try it I get an error: 'Invalid usage of aggregate function SUM and type: Timespan'

thanks
Fernando
Top achievements
Rank 1
 answered on 03 Apr 2014
6 answers
113 views
We're using the grid settings (GridSettingsPersister) to save the grid state on each page Page_PreRenderComplete, so that when the user returns later to the page it's always how they left it last. Conversely the Page_Load sets the state the first time.

I can't seem to find any combination of methods to do that here.
Peter Filipov
Telerik team
 answered on 03 Apr 2014
2 answers
217 views
Hi,

I've created a tooltip for my radgrid in the ItemCreated Event as shown in the code below.  However, I need to style the tooltip now and I don't know how to do it.  Can someone help me with this?

Thanks,

Andy
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridDataItem)
           {
               GridDataItem gridItem = e.Item as GridDataItem;
               foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
               {
                   if (column is GridBoundColumn)
                   {
                       if (column.UniqueName == "SocSecNum")
                       {
                           CaseSearchDTO obj = (CaseSearchDTO)gridItem.DataItem;
                           if (obj != null)
                               gridItem[column.UniqueName].ToolTip = obj.SocialSecurityNumberFull;
                       }
                   }
               }
           }

 

 

Andy
Top achievements
Rank 1
 answered on 03 Apr 2014
4 answers
89 views
I have users that complain about the inability to "double-click" or "right-click" from their tablets or phones.  Is it possible to trigger the opening of the advanced form via a button or other client side event?
Kate
Telerik team
 answered on 03 Apr 2014
1 answer
104 views
Is there any way to see the filename properties, such as the datetime, when you bring up the Document Manager. This is the middle section that has the file name and size. It would be nice to see the datetime of the file to know which ones were old for my client to archive.

Thanks.
Susan
Vessy
Telerik team
 answered on 03 Apr 2014
2 answers
319 views
Hi,

Unfortunately due to the legacy software I'm attempting to integrate RAD controls into jQuery is not available to complete the following task:

These are also quite old versions of the controls but hopefully the principle is the same, the calendar is in the code as:


<radCln:RadDatePicker ID="dpDateFrom" runat="server"        
                      Width="100px"
                      Calendar-Width="160px"   
                      Calendar-DayNameFormat="FirstLetter"                               
                      Calendar-EnableMultiSelect="false"
                      Calendar-ShowRowHeaders="false"
                      Calendar-ShowColumnHeaders="true">
    <ClientEvents OnDateSelected="OnFromDateSelected" OnPopupUpdating="OnFromDateSelected" />
    <Calendar runat="server" Skin="Default"
        <SpecialDays
            <radCln:RadCalendarDay Date="" Repeatable="Today"
                <ItemStyle BackColor="#e0e0e0" /> 
            </radCln:RadCalendarDay
        </SpecialDays
    </Calendar>  
</radCln:RadDatePicker>

When the OnFromDateSelected event is fired the following code is called:

function OnFromDateSelected(sender, e) {
 
        // The from date picker input.
        var fromDatePicker = document.getElementById("<%= dpDateFrom.ClientID%>");
        var fromDateCalendar = document.getElementById("<%= dpDateFrom.ClientID%>" + "_calendar");
        fromDateCalendar.get_selectedDate();
        // The to date picker input.
        var toDatePicker = document.getElementById("<%= dpDateTo.ClientID%>");
}

The problem I have is that the sender is a RadDatePicker object but I can't get a reference to anything but a HTML Table or Input using Javascript and the DOM. Any idea if it's possible to get the object you can use the method .get_selectedDate() on through vanilla Javascript?
Eliot
Top achievements
Rank 1
 answered on 03 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?