Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
361 views

I have a hierarchical radgrid that is displaying "No child records to display" even when records exist. See attached photo. Below is my RadGrid definition:

 

<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
                    AllowSorting="True"
                    OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource"
                    OnPreRender="RadGrid1_PreRender" GroupPanelPosition="Top" OnBatchEditCommand="RadGrid1_BatchEditCommand" Skin="Office2010Black"
                    AllowFilteringByColumn="True" CellSpacing="-1" GridLines="Both" Visible="false">
 
                    <MasterTableView DataKeyNames="wbs_id" RetainExpandStateOnRebind="True" AllowMultiColumnSorting="True" CommandItemDisplay="Top">
                        <DetailTables>
                            <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" Name="Steps">
                                <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings>
                            </telerik:GridTableView>
                            <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" Name="Steps">
                                <DetailTables>
                                    <telerik:GridTableView runat="server" Width="100%" DataKeyNames="task_id" RetainExpandStateOnRebind="True" EditMode="Batch" Name="StepDetails" CommandItemDisplay="Top">
                                    </telerik:GridTableView>
                                </DetailTables>
                            </telerik:GridTableView>
                        </DetailTables>
 
                        <CommandItemSettings ShowAddNewRecordButton="False"></CommandItemSettings>
                    </MasterTableView>
 
                    <PagerStyle Mode="NumericPages"></PagerStyle>
 
                    <MasterTableView DataKeyNames="wbs_id" AllowMultiColumnSorting="True" CommandItemDisplay="Top" RetainExpandStateOnRebind="true">
                        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="true"></CommandItemSettings>
 
                        <DetailTables>
 
                            <telerik:GridTableView DataKeyNames="task_id" Name="Steps" Width="100%" RetainExpandStateOnRebind="true">
 
                                <DetailTables>
 
                                    <telerik:GridTableView DataKeyNames="task_id" Name="StepDetails" Width="100%" EditMode="Batch" CommandItemDisplay="Top" RetainExpandStateOnRebind="true">
 
                                        <CommandItemSettings ShowSaveChangesButton="true" ShowCancelChangesButton="true" ShowAddNewRecordButton="false" />
 
                                        <Columns>
 
                                            <telerik:GridBoundColumn SortExpression="proc_id" HeaderText="proc id" HeaderButtonType="TextButton"
                                                DataField="proc_id" Display="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="proc_name" HeaderText="Step Name" HeaderButtonType="TextButton"
                                                DataField="proc_name" ReadOnly="true">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="proc_wt" HeaderText="Step Weight" HeaderButtonType="TextButton"
                                                DataField="proc_wt" ReadOnly="true" AllowFiltering="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="complete_pct" HeaderText="Percent Complete" HeaderButtonType="TextButton"
                                                DataField="complete_pct" ReadOnly="true" AllowFiltering="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridTemplateColumn UniqueName="CompleteFlag" DataField="complete_flag" HeaderText="Complete" ReadOnly="true"
                                                AllowFiltering="false">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#DataBinder.Eval (Container.DataItem,"complete_flag").ToString()!="N"? true:false %>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
 
                                            <telerik:GridDateTimeColumn MinDate="2013-01-01" DataField="act_start" HeaderText="Actual Start" SortExpression="act_start"
                                                UniqueName="act_start" DataType="System.DateTime" FilterControlAltText="Filter act_start column" DataFormatString="{0:yyyy/MM/dd}"
                                                ItemStyle-BackColor="#c6f3ff" AllowFiltering="false">
                                            </telerik:GridDateTimeColumn>
 
                                            <telerik:GridDateTimeColumn MinDate="2013-01-01" DataField="est_act_finish" HeaderText="Est/Actual Finish" SortExpression="est_act_finish"
                                                UniqueName="est_act_finish" DataType="System.DateTime" FilterControlAltText="Filter est_act_finish column" DataFormatString="{0:yyyy/MM/dd}"
                                                ItemStyle-BackColor="#c6f3ff" AllowFiltering="false">
                                            </telerik:GridDateTimeColumn>
 
 
                                            <telerik:GridBoundColumn SortExpression="complete_pct_upd" HeaderText="Updated Percent Complete" HeaderButtonType="TextButton"
                                                DataField="complete_pct_upd" DataType="System.Decimal" ItemStyle-BackColor="#c6f3ff" AllowFiltering="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="last_updated" HeaderText="Last Updated" HeaderButtonType="TextButton"
                                                DataField="last_updated" ReadOnly="true" DataType="System.DateTime" DataFormatString="{0:yyyy/MM/dd}"
                                                AllowFiltering="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="updated_by" HeaderText="Updated By" HeaderButtonType="TextButton"
                                                DataField="updated_by" ReadOnly="true" AllowFiltering="false">
                                            </telerik:GridBoundColumn>
 
                                            <telerik:GridBoundColumn SortExpression="comments" HeaderText="Comments" HeaderButtonType="TextButton"
                                                DataField="comments" ReadOnly="false" DataType="System.String" AllowFiltering="false" ItemStyle-BackColor="#c6f3ff">
                                            </telerik:GridBoundColumn>
 
                                        </Columns>
 
                                    </telerik:GridTableView>
 
                                </DetailTables>
 
                                <Columns>
 
                                    <telerik:GridBoundColumn SortExpression="task_id" HeaderText="task_id" HeaderButtonType="TextButton"
                                        DataField="task_id" Display="false" ReadOnly="true">
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn SortExpression="task_code" HeaderText="Activity ID" HeaderButtonType="TextButton"
                                        DataField="task_code" UniqueName="task_code" ReadOnly="true">
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn SortExpression="task_name" HeaderText="Activity Name" HeaderButtonType="TextButton"
                                        DataField="task_name" UniqueName="task_name" ReadOnly="true">
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn SortExpression="start" HeaderText="Start" HeaderButtonType="TextButton"
                                        DataField="start" UniqueName="start" DataType="System.DateTime" ReadOnly="true" DataFormatString="{0:yyyy/MM/dd}"
                                        AllowFiltering="false">
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn SortExpression="finish" HeaderText="Finish" HeaderButtonType="TextButton"
                                        DataField="finish" UniqueName="finish" DataType="System.DateTime" ReadOnly="true" DataFormatString="{0:yyyy/MM/dd}"
                                        AllowFiltering="false">
                                    </telerik:GridBoundColumn>
 
                                    <telerik:GridBoundColumn DataField="remain_work_qty" EmptyDataText="" HeaderText="Remaining Hours"
                                        SortExpression="remain_work_qty" UniqueName="remain_work_qty" DataType="System.Decimal"
                                        ReadOnly="true" AllowFiltering="false" DataFormatString="{0:0}">
                                    </telerik:GridBoundColumn>
 
                                </Columns>
 
                            </telerik:GridTableView>
 
                        </DetailTables>
 
                        <Columns>
 
                            <telerik:GridBoundColumn SortExpression="wbs_id" HeaderText="wbs_id" HeaderButtonType="TextButton"
                                DataField="wbs_id" Display="false">
                            </telerik:GridBoundColumn>
 
                            <telerik:GridBoundColumn SortExpression="wbs_name" HeaderText="Work Package" HeaderButtonType="TextButton"
                                DataField="wbs_name">
                            </telerik:GridBoundColumn>
 
                        </Columns>
 
                    </MasterTableView>
 
                </telerik:RadGrid>

 This is how it is being bound:

protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            
                if (RadComboBox1.SelectedIndex != -1 && RadDropDownList1.SelectedIndex != -1)
            {
                
                string projid = RadDropDownList1.SelectedValue;
                string cam = RadComboBox1.SelectedValue;
 
                if (!e.IsFromDetailTable)
                {
 
                    RadGrid1.DataSource = GetDataTable("SELECT * FROM PrimaveraWbs WHERE proj_id = " + projid + " and name = '" + cam + "'");
 
                }
            }          
        }
 
        public DataTable GetDataTable(string query)
        {
 
            String ConnString = ConfigurationManager.ConnectionStrings["PSMSystemConnectionString"].ConnectionString;
 
            SqlConnection conn = new SqlConnection(ConnString);
 
            SqlDataAdapter adapter = new SqlDataAdapter();
 
            adapter.SelectCommand = new SqlCommand(query, conn);
 
 
 
            DataTable myDataTable = new DataTable();
 
 
 
            conn.Open();
 
            try
            {
 
                adapter.Fill(myDataTable);
 
            }
 
            finally
            {
 
                conn.Close();
 
            }
 
 
 
            return myDataTable;
 
        }
 
        protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
 
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
 
            switch (e.DetailTableView.Name)
            {
 
                case "Steps":
                    {
 
                        string wbs_id = dataItem.GetDataKeyValue("wbs_id").ToString();
 
                        e.DetailTableView.DataSource = GetDataTable("SELECT * FROM PrimaveraTask WHERE wbs_id = " + wbs_id + " ORDER BY task_code");
 
                        break;
 
                    }
 
 
 
                case "StepDetails":
                    {
 
                        string task_id = dataItem.GetDataKeyValue("task_id").ToString();
 
                        e.DetailTableView.DataSource = GetDataTable("SELECT * FROM PrimaveraSteps WHERE task_id = " + task_id + "");
 
                        break;
 
                    }
 
            }
 
        }
 
        protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            
            string acb = RadDropDownList1.SelectedText;
            
            if (RadComboBox1 != null && RadDropDownList1.SelectedIndex != -1)
            {
                if (!Page.IsPostBack)
                {
 
                    RadGrid1.MasterTableView.Items[0].Expanded = true;
 
                    RadGrid1.MasterTableView.Items[0].ChildItem.NestedTableViews[0].Items[0].Expanded = true;
 
                }
            }
        }

How do I ensure that this message is not displayed when records do exist?

Thanks in advance,

Josh

Josh
Top achievements
Rank 1
 answered on 23 Apr 2015
1 answer
136 views
Hi,
I want when user clicks outside of  rad grid modal popup it should close the popup window. I need to make this only from client side
Lubomir
Top achievements
Rank 1
 answered on 23 Apr 2015
8 answers
67 views

Please double check your online demo pages, e.g. http://demos.telerik.com/aspnet-ajax/imageeditor/examples/overview/defaultcs.aspx

Try to open the Crop dialog (in IE11): 

SCRIPT5022: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'HwdlHwoCAh8LaB8MaGRk'.
File: Telerik.Web.UI.WebResource.axd, Line: 15, Column: 16485

Vessy
Telerik team
 answered on 23 Apr 2015
1 answer
99 views

I have a RadDropDownTree.  I populate it with a hierarchy from the database.  I set the "SelectedValue" equal to whatever group an employee belongs to (based on database record).

 So for example:  DropDownTree loads and selects "bakery" based on it's ID in the db.

Store

-->cashier

-->bakery (selected)

-->maintenance

So now I click on "cashier" and hit update.  On the server side, the DropDownTree.SelectedValue is still equal to the ID of the "bakery".  Why is the change not being sent to the server side?

Stacy
Top achievements
Rank 1
 answered on 23 Apr 2015
3 answers
118 views
How do I use RadDatePicker inside a Custom Server Control using HttpTextWriter? It seems that the Telerik control hates the invocation of `RenderControl` outside of a UI.Page class. Its a shame as the standard .Net controls honor `RenderControl(writer)` perfectly - yet Telerik controls don't. I assume this has to do with the script manager and registering events.

How can I get the flexibility of custom server controls whilst still being able to place Telerik controls inside them. User controls are not the answer.

Any suggestions or implementations?

Thankyou.
Eirik H
Top achievements
Rank 2
 answered on 23 Apr 2015
26 answers
1.0K+ views
Hello,

I am using a custom data object with a select-method that collects data from different tables, adding data from cached object collections etc. This is done with linq. It's working great with one exception: filtering data. When filtering data I cant get the filtering expression in a linq-syntax.

My radgrid has EnableLinqExpressions set to true, and my ObjectDataSource looks like below:

    <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="MyNameSpace.DataAccessLayer.UserDataObject" 
        SelectMethod="Select" SelectCountMethod="SelectCount" EnablePaging="True" runat="server" 
        MaximumRowsParameterName="maximumRow" OldValuesParameterFormatString="original_{0}" 
        OnSelecting="ObjectDataSource1_Selecting" OnSelected="ObjectDataSource1_Selected"
        <SelectParameters> 
            <asp:Parameter Name="shopID" Type="Int32" /> 
            <asp:Parameter Name="filter" Type="String" /> 
            <asp:Parameter Name="sort" Type="Object" /> 
            <asp:Parameter Name="startRowIndex" Type="Int32" /> 
            <asp:Parameter Name="maximumRow" Type="Int32" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 


I set the parameters in the selecting-event of the ObjectDataSource:

    protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) 
    { 
        e.InputParameters["shopID"] = thisShop.ShopID; 
        e.InputParameters["filter"] = RadGrid1.MasterTableView.FilterExpression; 
        e.InputParameters["sort"] = RadGrid1.MasterTableView.SortExpressions.GetSortString(); 
        e.InputParameters["startRowIndex"] = RadGrid1.CurrentPageIndex*RadGrid1.PageSize; 
        e.InputParameters["maximumRow"] = RadGrid1.PageSize; 
    } 

How can I get the filterexpression to be in a linq-friendly format so that I can use it in my linq-query?
Angel Petrov
Telerik team
 answered on 23 Apr 2015
7 answers
285 views
If you click on a dropdown in the iphone or ipad you get the keyboard popup, even though it is only a dropdown. There is no way to turn that off.
Dimitar
Telerik team
 answered on 23 Apr 2015
1 answer
55 views

Already I implemented custom sorting and custom paging with objectdatasource and database. Now I need to implement custom filtering in rad grid with objectdatasource and database.

Can you send me any sample solution?

Maria Ilieva
Telerik team
 answered on 23 Apr 2015
4 answers
117 views
Hi Team,

While we are using Telerik control functionality we are facing following issues. this is very serious and waste of our time also, Please check the following issue and let me know if already fixed.

Currently i am using Telerik Version 2013.3.1324.40

1.RadMenu

I am using RadMenu binding with LoadXml. i want to use EnableRootItemScroll="true". in that time i move the mouse continuously i got the alignment issue. please check the attached screen shot. if EnableRootItemScroll="false" it is working fine. but i want to use EnableRootItemScroll="true".
in this issue we can not tell users do not scroll more then one time. please check and let us know ASAP.

2.RadGrid Filter Case Sensitive using EntityDataSource

Case Sensitive is not working using EntityDataSource. but it is working in sqlDataSource. in this case we can not tell users case sensitive is not working. please check the attached Screen shot and let us know ASAP.

3. RadGrid Frozen Column not working using tab key

i am using Radgrid Frozen column. if use mouse to scroll for insert or update frozen column not hiding. but i use tab key for move next column frozen not working. Please check the Screen shot and let know ASAP.

4. RadGrid PDF not open in Apple IPad

i am using download ExportPDF from Radgrid. it is showing blank in Apple IPad. but it is working in Window and MAC. i download that PDF and change "Security Method". send to ipad through mail. not it is open. but we need to restrict default Security Method "Password Security". please check the attached screen shot and let us know the solution.


Above the issue we are facing various time and important also. we are answerable person to out client. we spend lot of time for these issues instead of development. please give some more effort for these issue and give the solution ASAP.


Thanks in Advance,
Dhamu
Tulika
Top achievements
Rank 1
 answered on 23 Apr 2015
2 answers
77 views

hi,

i bind hmtlchart from dataset i want to display just the datetime wich is into dataset but in displaying it's apear an interval of datetime 

in this pics you wille understanding me more and i use gridview to disply the data are in dataset plz help me i'm working in project and i need help quickly 

EssMus
Top achievements
Rank 1
 answered on 23 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?