Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
246 views
I have RadWindow, inside page with RadTabStrip/RadMultiPage, each RadPageView have RadSplitter with Width/Height=100%. RadSplitter usualy have 2 horizontal panels, up for main content (grid or test boxes) and bottom is height=40 for buttons like Save/Cancel. When I open RadWindow, RadSplitter fills entire space and controls iniside fills pane and everything is ok.


When I resize RadWindow at same time is RadSplitter resized to fill space and that is ok but only in active RadPageView. Other  RadSplitters in other RadPageViews is frozen to initial size and it looks ugly and the useless.
How to persuade all RadSplitters in all RadPageViews to resize and fill Width/Height=100% when I resize RadWindow?


It can be done by some client function on RadTabStrip.OnClientTabSelected but what to do with RadPageViews without tabs? 
I have some RadPageViews that are accessed by code behind (not by tabs) and there is no RadMultiPage.OnClientSelected event. 
Niko
Telerik team
 answered on 13 Jun 2011
1 answer
54 views
Hi guys, I've been pouring over the demos looking for a solution to a scenario i'm facing, and I'm starting to get a little bug-eyed so I thought I would throw it out there...

I have a radgrid with rows that contain a location, a quantity, and a dollar amount like this:

  • location X, qty 1, amount $1
  • location X, qty 2, amount $1.33
  • location Y, qty 1, amount $1.01
  • location Y, qty 2, amount $1.17
  • etc

I have a radwindow pop-up that 'sits on top' of this radgrid (actually a separate aspx). The popup allows them to enter a value that will be used to adjust the amount for all rows matching a given quantity. So if I pick qty 1 and adjust by .1 (up), i want to programmatically and automatically update the data for the matching rows in the grid. regardless of the value of location. In this case the data would look like this after the update:

  • location X, qty 1, amount $1.1 (updated +.1)
  • location X, qty 2, amount $1.33
  • location Y, qty 1, amount $1.11 (updated +.1)
  • location Y, qty 2, amount $1.17

I have the radwindow passing back the necessary values and I'm trying to plug through the JavaScript necessary to programmatically  1) loop through and find the rows with the matching quantity (it's a key field), 2) edit them with a new amount, 3) post the update.Sort of an automatic batch update.

Is there a demo on this scenario out there? I'm sure I'm missing it.

Thanks!

  • location X, qty 1, amount $1
  • location X, qty 2, amount $1.33
  • location Y, qty 1, amount $1.01
  • location Y, qty 2, amount $1.17
  • etc
  • location X, qty 1, amount $1
  • location X, qty 2, amount $1.33
  • location Y, qty 1, amount $1.01
  • location Y, qty 2, amount $1.17
  • etc
  • Marin
    Telerik team
     answered on 13 Jun 2011
    1 answer
    140 views
    Hi All,

    I have one functionality where in RadGrid when user clicks on row i am redirecting to another page. I have updated radgrid, before updating i can found ItemType by row.Itemtype property where as after updating i can't getting RowType. Can any one please help in this.

    I did like below but no use

    function RowSelected(sender, eventArgs)
    {
    if (($get(eventArgs.get_id()).ItemType == "Item") ||
    ($get(eventArgs.get_id()).ItemType == "AlternatingItem")) {
    var rowTable = $get(eventArgs.get_id()).Owner;
    var myIdCell = rowTable.GetCellByColumnUniqueName($get(eventArgs.get_id()), "ID");

    I have searched in below link but i did not find suitable solution for me

    http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideevents/defaultcs.aspx

    Thanks in advance.

    Thanks,
    Sai Charan.M
    Iana Tsolova
    Telerik team
     answered on 13 Jun 2011
    5 answers
    274 views
    Hello,

    I saw my problem has already been explained in others threads, but I can't resolve it.

    Here it is:

    Server side:
    - I use a datasource to populate my listbox, and I select an item

    Client side:
    - I want to scroll to my selected item with te code below:

    <

     

    body >

     

     

    <form id="form1" runat="server">  

     

    <asp:ScriptManager ID="ScriptManager1" runat="server">

     

    </asp:ScriptManager>

     

     

    <script type="text/javascript"> 

     

    function 

     

    scrollToSelected(sender, args)
    {

     

     

            var item = sender.get_selectedItem();  

     

            if (item)

            {  

     

                item.ensureVisible(); 

     

                sender.clearSelection();  

     

            }  

     

    }

     

    </script 

     

    <div>...

     

    and in my listbox definition I add

     

     

    OnClientLoad

     

    ="scrollToSelected"

     

     

    This works only when I refresh my page, but it doesn't work the first time. I tried with OnSelectedIndexChanged, but it doesn't work anymore.

    Coul do help me please?
    Best regards,

    André

    Helen
    Telerik team
     answered on 13 Jun 2011
    1 answer
    109 views
    I would like to create a hierarchical Grid that has a parent row and then 1-n child rows.
    The parent row would be indexed by a unique datetime. Then containing many rows of data that would make up the
    parent rows many attributes.

    Example

    Automobile          1/1/2009
                    Color              red
                    Engine            V8
                    Horse Power  225

    Automobile          2/1/2009
                    Color              Green
                    Engine            V6
                    Horse Power  200

    My question is if I had created the parent row and the children rows is there a way to select the parent and then copy/duplicate/clone
    all of the rows that makeup the parent and children and then allow the user to set the new date for the copied parent row. 
    Veli
    Telerik team
     answered on 13 Jun 2011
    1 answer
    94 views
    I have an radListView, I bind images from database, each page will display 3 images,
    if inside the database, got 4 images, it will have 2 pages

    in the page 2, it have 1 image only. i want to reload the first two image and show in page 2,
    I want to rebind the same record and again and again...
    do you know how can i do???


    radlist view page 1                      radlistview page 2                           
    1                                                              4
    2                                                              1
    3                                                              2
    Iana Tsolova
    Telerik team
     answered on 13 Jun 2011
    8 answers
    354 views
    Hi,

    I would like to accomplish the following:
    A RadGrid with allow multiple row selection, but (de)selection should only be accomplished through the checkboxes in the GridClientSelectColumn. The selected row(s) should not be highlighted. The only indication for being selected should be the checked checkbox(es). This is because I would like a row to be highlighted when an user clicks on it anywhere but the checkbox, but it should not be selected.
    So checking a row's checkbox or clicking a row anywhere but the checkbox should display very distinct and seperate behavior instead of the default tightly coupled behavior.

    Does anyone know how to accomplice this in a relative simple manner? Or does it interfere so much with the way the RadGrid is build that it is (nearly) impossible?

    Thanks in advance for any help on this.

    Cheers,

    Mink
    Iana Tsolova
    Telerik team
     answered on 13 Jun 2011
    3 answers
    88 views
    Hi,
       I am creating grids on selection of a dropdown item dynamically in Page_Init. The grids are editable and automatic insert is enabled. The update and insert is working properly.

     Once I click update after modifying a row, the row is still staying in edit mode and not returning to normal view, however the update happens successfully. I had to click Cancel to return the row to normal mode. The same is happening for Inserting new row also.

    Is it the expected behaviour of RadGrid ? I guess not. Then what may be the possible reason for this and how can I overcome this.


    Thanks & Regard,
      Farhad
    Farhad
    Top achievements
    Rank 1
     answered on 13 Jun 2011
    1 answer
    268 views
    Hi, 

    i am working on telerik grid. i want to change row color of row in javascript i.e 

     function RadGrid1_RowDataBound(sender, args) {              
                                    if (args.get_dataItem()['LastName'] == "owner") {
                                        args.get_item().get_cell('LastName').style.Backcolor ='Red';  // how to do this
                                    }
    }


    plz help

    Regards,

    Faisal

    Princy
    Top achievements
    Rank 2
     answered on 13 Jun 2011
    5 answers
    190 views
    Hi,
    I am trying to export a radgrid to pdf which is having data in NestedViewTemplate.
    When I try to do so the error come, please see the attached snapshot for error details.

    My code is as belows:

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadGrid ID="radGridShippedOrders" runat="server" GridLines="None" AllowPaging="True"
                PageSize="15" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true" ShowHeader="false"
                HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridShippedOrders_NeedDataSource" 
                 OnItemCommand="radGridShippedOrders_OnItemCommand" AllowCustomPaging="true" VirtualItemCount="5"
                Width="800px" AllowMultiRowSelection="False" AllowFilteringByColumn="true" ShowGroupPanel="True">
                <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                
                <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
                     <Pdf PageTitle="Shipped Orders" />
                     <Excel Format=ExcelML />
                </ExportSettings>


                <MasterTableView GroupLoadMode="Client" CommandItemDisplay="None" DataKeyNames="OAHSSQ" Name="MTVShippedOrders">
                    <Columns>
                        <telerik:GridBoundColumn UniqueName="OAORGN" HeaderText="OAORGN" DataField="OAORGN">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="OAHSSQ" HeaderText="OAHSSQ" DataField="OAHSSQ">
                        </telerik:GridBoundColumn>
                    </Columns>
    <NestedViewTemplate>
                        <b>Invoice Header</b><br />
                        <telerik:RadGrid ID="radGridInvoiceHeader" runat="server" GridLines="None" AllowPaging="True"
                            PageSize="20" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="false" ShowHeader="false"
                            HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridInvoiceHeader_NeedDataSource"
                            Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false">
                            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                            <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true">
                                <Pdf PageTitle="Invoice Header" />
                            </ExportSettings>
                            <MasterTableView CommandItemDisplay="Bottom">
                                  <Columns>
                                    <telerik:GridBoundColumn UniqueName="OHORNO" HeaderText="Order Number" DataField="OHORNO"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="OHCSNM" HeaderText="Customer Name" DataField="OHCSNM"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="OHCAD1" HeaderText="Sold To Add 1" DataField="OHCAD1"></telerik:GridBoundColumn>
    </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                        
                        <br />
                        <b>Invoice Details</b><br />
                        <telerik:RadGrid ID="radGridInvoiceDetails" runat="server" GridLines="None" AllowPaging="True"
                            PageSize="20" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="false" ShowHeader="false"
                            HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridInvoiceDetails_NeedDataSource"
                            Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false" OnItemDataBound="radGridInvoiceDetails_ItemDataBound">
                            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
                            <ExportSettings ExportOnlyData="false" IgnorePaging="true" OpenInNewWindow="true">
                                <Pdf PageTitle="Invoice Header" />
                            </ExportSettings>
                            <MasterTableView CommandItemDisplay="Bottom" ShowFooter="true">
    <Columns>
                                    <telerik:GridBoundColumn UniqueName="ODITNO" HeaderText="Item Number" DataField="ODITNO"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="ODITD1" HeaderText="Item Description" DataField="ODITD1"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="ODQTOR" HeaderText="Quantity Ordered" DataField="ODQTOR"></telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>


                    </NestedViewTemplate>


                </MasterTableView>
                 <ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"
                    AllowColumnsReorder="True">
                </ClientSettings>
                 <GroupingSettings ShowUnGroupButton="true" />
            </telerik:RadGrid>
        

    CODE BEHIND
    protected void btnExportToPDF_Click(object sender, EventArgs e)
            {
                radGridShippedOrders.ExportSettings.OpenInNewWindow = true;
                radGridShippedOrders.ExportSettings.ExportOnlyData = true;
                radGridShippedOrders.ExportSettings.IgnorePaging = true;

                foreach (GridDataItem gi in radGridShippedOrders.MasterTableView.Items)
                {
                    gi.Expanded = true;
                    if (gi.HasChildItems)
                    {
                        RadGrid rgHeader = (RadGrid)gi.ChildItem.NestedViewCell.Controls[0].Controls[1];
                        rgHeader.Rebind();

                        RadGrid rgDetails = ((RadGrid)gi.ChildItem.NestedViewCell.Controls[0].FindControl("radGridInvoiceDetails"));
                        rgDetails.Rebind();
                    } 
                }
                radGridShippedOrders.MasterTableView.HierarchyDefaultExpanded = true;
                radGridShippedOrders.MasterTableView.ExportToPdf();
            }
    Ajay
    Top achievements
    Rank 1
     answered on 13 Jun 2011
    Narrow your results
    Selected tags
    Tags
    +? more
    Top users last month
    Edmond
    Top achievements
    Rank 1
    Iron
    fabrizio
    Top achievements
    Rank 2
    Iron
    Veteran
    RobMarz
    Top achievements
    Rank 2
    Iron
    Fakhrul
    Top achievements
    Rank 1
    Iron
    Tejas
    Top achievements
    Rank 2
    Iron
    Iron
    Iron
    Want to show your ninja superpower to fellow developers?
    Top users last month
    Edmond
    Top achievements
    Rank 1
    Iron
    fabrizio
    Top achievements
    Rank 2
    Iron
    Veteran
    RobMarz
    Top achievements
    Rank 2
    Iron
    Fakhrul
    Top achievements
    Rank 1
    Iron
    Tejas
    Top achievements
    Rank 2
    Iron
    Iron
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?