Date : March 29 2020, 07:55 AM
Hope this helps I have a problem with primefaces datatable. As you can see there is an alignment problem with columns border and headers. Is this a primefaces bug or there is something wrong with my datatable? By the way datatable has dynamic columns. , Do one trick, Remove scrollable = true
.ui-datatable-hor-scroll .ui-datatable-tablewrapper,.scrolling-div .ui-datatable-tablewrapper{
overflow: auto;
width: 100%;
padding-bottom: 5px;}
|
datatable column header alignment issue
Date : March 29 2020, 07:55 AM
I wish this help you Hi we can solve the issue by adding our own custom scrolling facility.
|
Column alignment in DT datatable
Tag : r , By : inquiringmind
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further You have to set columnDefs in the argument option of the function datatable. Look the example below library(DT)
datatable(head(iris), rownames = FALSE, options = list(
columnDefs = list(list(className = 'dt-center', targets = 0:4))
))
|
Dynamic column alignment in DT datatable
Date : March 29 2020, 07:55 AM
it helps some times Datatable options are not reactive in the sense that you can't change the options without redrawing the entire table, but if you are willing to redraw the table then it isn't a problem see below: If you change your server function to this it should work: server<-shinyServer(function(input, output) {
# Return the requested dataset
columns <- reactive({
switch(input$columns,
all= c("V1","V2","V3","V4","V5","V6","V7","V8","V9","V10"),
left= c("V1","V2","V3","V4","V5"),
right= c("V6","V7","V8","V9","V10"))
})
# reactive datatable
rdt <- reactive({
DT::datatable(format(DT[,.SD,.SDcols=columns()],digits=0,scientific=FALSE),
option=list(columnDefs=list(
list(targets=seq_len(length(columns()))-1,
class="dt-right"))))
})
# Show table
output$view <- DT::renderDataTable(
rdt()
)
})
|
Bootstrap Label and Field alignment not working because of JQuery DataTable formatting
Date : March 29 2020, 07:55 AM
Hope that helps You are using form-inline class in the first div and since the form-group is inside this div it will have the inline-block css : @media (min-width: 768px)
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
|