Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
104 views

Hi,

I have a typical master/child RadGrid:

<telerik:RadGrid ID="RadGridParent"
    AutoGenerateColumns="false"
    DataSourceID="ObjectDataSourceParent"
    runat="server">
    <MasterTableView
        DataSourceID="ObjectDataSourceParent"
        DataKeyNames="Id"
        Name="ParentGrid"
        CommandItemDisplay="Top"
        HierarchyDefaultExpanded="true"
        EnableHierarchyExpandAll="true"
        ShowFooter="false">
        <CommandItemSettings ShowAddNewRecordButton="false" />
        <DetailTables>
            <telerik:GridTableView
                DataSourceID="ObjectDataSourceChild"
                DataKeyNames="Id"
                Name="ChildGrid"
                CommandItemDisplay="Top"
                EditMode="InPlace"
                ShowFooter="false"
                HierarchyDefaultExpanded="true"
                runat="server">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="ParentId" MasterKeyField="Id"></telerik:GridRelationFields>
                </ParentTableRelation>
                <Columns>
                ...
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
</telerik:RadGrid>
<asp:ObjectDataSource ID="ObjectDataSourceParent" runat="server"
    SelectMethod="RetrieveList">
    <SelectParameters>
        <asp:QueryStringParameter Name="Id" querystringfield="id" />
    </SelectParameters>           
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSourceChild" runat="server"
    SelectMethod="RetrieveList">
    <SelectParameters>
        <asp:Parameter Name="parentId" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

 

The problem is with the following line:

<asp:Parameter Name="parentId" Type="Int32" />

I'd like to specify the parentId of the corresponding parent record. How can I do that?

 

Thanks,

Leszek

 

Leszek
Top achievements
Rank 1
 asked on 13 Sep 2017
1 answer
90 views

I have a RADGrid that looks like this:

<telerik:RadGrid ID="gvMembers" runat="server"
         OnNeedDataSource="gvMembers_NeedDataSource"
         AllowSorting="true"
         AllowPaging="true"
         PageSize="10"
         AllowAutomaticUpdates="true"
         AllowAutomaticInserts="true"
         AllowAutomaticDeletes="true"
         OnItemCreated="gvMembers_ItemCreated"
         OnItemInserted="gvMembers_ItemInserted"
         OnPreRender="gvMembers_PreRender"
         OnInsertCommand="gvMembers_InsertCommand"
         OnItemDataBound="gvMembers_ItemDataBound">
         <HeaderStyle CssClass="GridHeader" />
         <PagerStyle Mode="NextPrevNumericAndAdvanced" />
         <MasterTableView AutoGenerateColumns="false" DataKeyNames="UserID" CommandItemDisplay="Top">
             <Columns>
                 <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                 <telerik:GridBoundColumn DataField="UserId" Visible="false" MaxLength="6"></telerik:GridBoundColumn>
                 <telerik:GridCheckBoxColumn DataField="Valid" HeaderText="Active" SortExpression="Valid" UniqueName="valid"></telerik:GridCheckBoxColumn>
                 <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortExpression="FirstName" UniqueName="firstname"></telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="FirstName" HeaderText="Last Name" SortExpression="LastName" UniqueName="lastname"></telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" SortExpression="UserName" UniqueName="username"></telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="Email" SortExpression="EmailAddress" UniqueName="email"></telerik:GridBoundColumn>
                 <telerik:GridTemplateColumn HeaderText="Role2" DataField="Role" UniqueName="Role2">
                     <ItemTemplate>
                         <%#DataBinder.Eval(Container.DataItem, "Role")%>
                     </ItemTemplate>
                     <EditItemTemplate>
                         <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server"></telerik:GridDropDownListColumnEditor>
                     </EditItemTemplate>
                 </telerik:GridTemplateColumn>
             </Columns>
         </MasterTableView>
     </telerik:RadGrid>

The NeedDataSource for the grid is pulled from a SQL View. When I edit or insert  I need to use a DropDown for the Role.  That Role data will come from a SQL table that contains the RoleName and the RoleID.  How can I configure the DropDown to get that data to show??

Perry
Top achievements
Rank 1
 answered on 13 Sep 2017
16 answers
646 views

I want to reduce/hide a few filter options in rad grid (Version 5.1.2.0) . The options to hide are different for different columns. So to do this I am using client side java script as mentioned in the forums. I am using Telerik Q3 2007. but as it seems its not working at all for me. I am following the tutorial in telerik website Reducing the filter menu options


   <script type="text/javascript" language="javascript">     
             
        function filterMenushowing(sender, eventArgs)   
        {     
            if (eventArgs.get_column().get_uniqueName() == "unique_invoice_no")      
            {              
                var menu = eventArgs.get_menu();   
                var items = menu._itemData;   
  
                var i = 0;   
                while (i < items.length)     
                {     
                    if (items[i].value != "NoFilter" && items[i].value != "EqualTo")     
                    {     
                        var item = menu._findItemByValue(items[i].value);   
                        if (item != null)   
                            item._element.style.display="none";   
                    }     
                    i++;     
                }     
            }      
        }   
    </script>  

My problem is that eventArgs.get_column().get_uniqueName() and eventArgs.get_menu() are always undefined. I have also tried the following code snippet, which I found in the online help documents, but nothing is happening. Now with this code, I get the menu and all the filter items in the menu, but don't know how to get the menu item and how to hide that item.

<ClientSettings>  
    <ClientEvents OnFilterMenuShowing="filterMenuShowing" />  
</ClientSettings>  

<script type="text/javascript" language="javascript">         
    function filterMenuShowing(sender, eventArgs)   
    {     
        if (eventArgs.Column.UniqueName == "Name")      
        {              
            var menu = eventArgs.Menu;   
            var items = menu.Items;   
            var i = 0;   
                 
            while (i < items.length)     
            {    
                if (items[i].Value != "NoFilter" && items[i].Value != "EqualTo")     
                {     
                    /* what to write here to hide the menu items */
      
                }     
                i++;     
            }     
        }      
    } 
</script> 

Any help would be appreciated

DogBizPro
Top achievements
Rank 1
 answered on 13 Sep 2017
1 answer
129 views

Hello,

I'm using embedded bar graphs in a grid () and it will have 1-3 items contained within the graph depending on the row.  Is there some way to adjust the graph (or the row width) to cater for larger or smaller graphs rather than them all being the same size.

See attached diagram as an example.  I would like the size of the bars in the graph to be standardized regardless of how items there are.  E.g. in this case have the single item graph be the same width as the 2 item graphs.

Thanks

Vessy
Telerik team
 answered on 13 Sep 2017
8 answers
186 views
Hello,

This is no specific to telerik, but may be I could get some answer to my question here.
My Radcombobox is in a small iFrame and when I try to expand it, it expands but behind the iframe windows, is it pssible to have it expanding on top of surrounding window ?

CS
simi
Top achievements
Rank 1
 answered on 13 Sep 2017
1 answer
146 views

I see a TON of articles about this and have tried many of the items, but none are working the way I hope....

We are using the datagrid for our reporting section in our software. As such there are many reports that have a lot of records, for example the one I am working with now has 51000+. This 'report' takes upwards of 30 seconds to load all of those records. Is that normal? Seems long to me. 

I have played with the examples but none seem to allow us to have a 'report' where our clients can then filter the report by the columns and load quickly. The filter, saving the filter, etc works great! It just takes a long time to load. If we limit the number of rows it loads how do we do that such that the filter still work for ALL the possible records and not just the ones currently loaded?

Not sure if that makes sense or not :) 

Thanks!!

Eyup
Telerik team
 answered on 13 Sep 2017
0 answers
252 views
Hello, can you please tel me on donuts chart how i can bind data on Series Item , I've create data source SQL query which show's 2 value's please see the code

<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="dountchart">
                          <PlotArea>
                              <Series>
                                  <telerik:DonutSeries StartAngle="90" Name="DonutSeries1" DataFieldY="costbudget">
                                      
                                  </telerik:DonutSeries>
                              </Series>
                          </PlotArea>



<Zoom Enabled="False"></Zoom>

                      </telerik:RadHtmlChart>
                      <asp:SqlDataSource ID="dountchart" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT ROUND((SELECT SUM([Budget Estimates 2017-18]) AS FUNDWISE FROM [budgetbook-17-18] WHERE (Cost_ctr = @cost1)) / (SELECT SUM([Budget Estimates 2017-18]) AS costwise FROM [budgetbook-17-18] AS [budgetbook-17-18_3] WHERE (Fund = @fund1)) * 100, 0) AS costbudget, NULLIF ('', 0) AS totalbudgetsc UNION ALL SELECT NULLIF ('', 0) AS Expr1, ROUND((SELECT value FROM donut) - (SELECT SUM([Budget Estimates 2017-18]) AS FUNDWISE FROM [budgetbook-17-18] AS [budgetbook-17-18_2] WHERE (Cost_ctr = @cost2)) / (SELECT SUM([Budget Estimates 2017-18]) AS costwise FROM [budgetbook-17-18] AS [budgetbook-17-18_1] WHERE (Fund = @fund2)) * 100, 0) AS Totalbudgetofsc">
                          <SelectParameters>
                              <asp:ControlParameter ControlID="costcenter" Name="cost1" PropertyName="Text" />
                              <asp:ControlParameter ControlID="scnum" Name="fund1" PropertyName="Text" />
                              <asp:ControlParameter ControlID="costcenter" Name="cost2" PropertyName="Text" />
                              <asp:ControlParameter ControlID="scnum" Name="fund2" PropertyName="Text" />
                          </SelectParameters>
                      </asp:SqlDataSource>
Liaqat
Top achievements
Rank 1
 asked on 13 Sep 2017
2 answers
231 views
Hi,

I have a RadEditor inside a panel, that I'm showing through a modalPopupExtender, but only the buttons from the editor works. (like bold and italic buttons), but the dropdown style buttons won't work. (like selecting font)

Here is the code:

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <asp:UpdatePanel runat="server" ID="updatePanel1"
        <ContentTemplate> 
            <asp:Button ID="btn_test" Text="Test" runat="server" /> 
             
            <cc1:ModalPopupExtender ID="btn_test_ModalPopupExtender" runat="server"  
                DynamicServicePath="" Enabled="True" PopupControlID="panelPopup"  
                TargetControlID="btn_test"
            </cc1:ModalPopupExtender> 
             
            <asp:Panel runat="server" ID="panelPopup"
                <telerik:RadEditor runat="server" ID="RadEditor1"
                </telerik:RadEditor> 
            </asp:Panel> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
</asp:Content> 

Any kind of help is welcome!

thanks a lot!
letrungthang
Top achievements
Rank 1
 answered on 13 Sep 2017
2 answers
135 views

I have embed a telerik spreadsheet control in one of my classic asp.net page. The spreadsheet is being loaded with contents of a xlsx spreadsheet. I am using a custom data provider to load the data from the spreadsheet into the Telerik Spreadsheet Control. Below is my code for custom data provider.

namespace SpreadsheetDemo
    {
        public partial class Spreadsheet : Page
        {
            private const string ProviderSessionKey = "Demo";
     
            protected void Page_Load(object sender, EventArgs e)
            {
                SpreadsheetDocumentProvider provider;
                if (Session[ProviderSessionKey] == null || !IsPostBack)
                {
                    provider = new SpreadsheetDocumentProvider(Server.MapPath("~/App_Data/Visit_Tracker.xlsx"));
                    Session[ProviderSessionKey] = provider;
                }
                else
                {
                    provider = (SpreadsheetDocumentProvider) Session[ProviderSessionKey];
                }
     
                rdSpreadsheet1.Provider = provider;
                 
            }
        }
    }

 

I am able to perform all the operations how ever I want to enable the "History" feature that is available for the workbook class.

I have added the namespace

using Telerik.Windows.Documents.Spreadsheet.History;

in my solution however I am not able to access the History object for the spreadsheet control "rdSpreadsheet1"

Can anyone please let me know how to access the history feature for the spreadsheet control.

Karthik
Top achievements
Rank 1
 answered on 12 Sep 2017
1 answer
590 views

I am working on a maintenance project which was written using VB.NET on v4.0, this code is not written by me, It was written by some different dev team long time ago.

My job is to run this code and deploy it on IIS. When i run this code on my local machine, it works fine. But when deploy it on IIS and run it, Then I am getting this weird error. Which i have never seen and i never worked with ASP.NET Web forms.

I have checked in bin folder for Telerik.Web.UI.dll. All files are in place and they are licensed dll's.

I even check in web.config it has been registered over there. 

Please help me out.

Thanks 

Jawand Singh  

Rumen
Telerik team
 answered on 12 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?