Building data table

Building data table

sarojlintusarojlintu Posts: 6Questions: 1Answers: 0

While building data table, tbody is coming above to the thead. which results chrome is not showing border of tbody. Whereas in mozilla and IE is showing border.

In one page i have so many datatable. But only one datatable it is behaving like this. All database i am getting first thead and then tbody in the same page.

What might be the issue. Even i compared all the codes it seems perfect but could not able to find the couse of not showing border in tobody td.

-saroj

Replies

  • allanallan Posts: 63,754Questions: 1Answers: 10,509 Site admin

    Can you link to a page showing the issue, per the forum rules please.

    Allan

  • sarojlintusarojlintu Posts: 6Questions: 1Answers: 0
    edited October 2015

    It is huge healthcare product for US made in .Net. I cannot share the link but i can share the code.

    <div class="row">
        <div class="dataTables_scrollHead datagrid-mainblock">
            <div class="dataTables_scrollHeadInner datagrid-innerblock">
                <div class="col-md-12" id="divdtAlertDetails">
                    <table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-stripped table-hover" id="dtAlertDetails">
                        <thead>
                            <tr>
                                <th class="sorting_disabled"></th>
                                <th class="sorting_disabled"></th>
                                <th>Effective Date</th>
                                <th>Term Date</th>
                                <th>Alert Type</th>
                                <th>Alert Text</th>
                                <th>Alert Result/Module</th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
    
    var jsonAlertList = [];
        function AddAlertDetails(MemberAlertID, AlertTypeID, IsAuth, IsClaim, IsMemberServices, Content, AlertEffectiveDate, AlertTermDate) {
            var pOA_obj = {
                MemberAlertID: MemberAlertID,
                AlertTypeID: AlertTypeID,
                IsAuth: IsAuth,
                IsClaim: IsClaim,
                IsMemberServices: IsMemberServices,
                Content: Content,
                EffectiveDate: AlertEffectiveDate,
                TermDate: AlertTermDate == '' ? null : AlertTermDate,
            }
            jsonAlertList.push(pOA_obj);
        }
    
        @foreach (var item in Model.MemberAlerts)
        {
            @:AddAlertDetails("@item.MemberAlertID", "@item.AlertTypeID", "@item.IsAuth", "@item.IsClaim", "@item.IsMemberServices", "@Html.Raw((item.Content ?? "").Replace(System.Environment.NewLine, " ").Replace("\r", " ").Replace("\n", " ").Replace(@"\", @"\\")).ToHtmlString()", "@item.AlertEffectiveDate", "@item.AlertTermDate");
                            }
    
        var settings = {
            ServiceURL: '@(HAXG.Common.Config.AppSettings.ServiceURL)',
            jsonAlertList: jsonAlertList, MemberID: '@Model.MemberID',
            IsDownload: '@(HAXG.Web.Helper.PageAccessHelper.HasPrivilege(Enums.Page.MemberRecord, Enums.AcccessRight.Export_DownloadFile))',
            IsReadonly: '@(HAXG.Web.Helper.PageAccessHelper.HasPrivilege(Enums.Page.MemberRecord, Enums.AcccessRight.ReadOnly))',
        }
        MemberAdditionalInfo_Alert.Initialize(settings);
    
  • allanallan Posts: 63,754Questions: 1Answers: 10,509 Site admin

    I'm afraid there is really not much help I can offer in that case. The core above looks okay. I would need to be able to see the rendered page. Sorry.

    Allan

This discussion has been closed.