Page 1 of 1
Separation between columns of a GridView
Posted: Thursday 8th September 2022 12:11pm
by gambafeliz
I have a GridView where the width of the columns is set to automatic (Width=-1) but I have a problem.
Example, visual:
Column1 | Column2
09/06/2022 10:0009/06/2022
Is it possible, having the width set to automatic, to put a separation between the columns?
how do i do it?
Re: Separation between columns of a GridView
Posted: Thursday 8th September 2022 1:37pm
by vuott
gambafeliz wrote: ↑Thursday 8th September 2022 12:11pm
having the width set to automatic, to put a separation between the columns?
Excuse me, can you explain better?
Re: Separation between columns of a GridView
Posted: Thursday 8th September 2022 3:35pm
by gambafeliz
Hello, Vuott, I'm glad to greet you.
I'll explain it visually.
Right now it looks like this: (Width=-1)
Column1 | Column2
09/06/2022 10:0009/06/2022
I wish I could see it like this: (How do I do it, is it possible to do it?)
Column1 | Column2
09/06/2022 10:00 | 09/06/2022
Re: Separation between columns of a GridView
Posted: Thursday 8th September 2022 6:56pm
by BruceSteers
gambafeliz wrote: ↑Thursday 8th September 2022 3:35pm
Hello, Vuott, I'm glad to greet you.
I'll explain it visually.
Right now it looks like this: (Width=-1)
Column1 | Column2
09/06/2022 10:0009/06/2022
I wish I could see it like this: (How do I do it, is it possible to do it?)
Column1 | Column2
09/06/2022 10:00 | 09/06/2022
Did you enable the Grid property to show grid lines? might help.
Other cell/column/row options that could help are
text alignment , you could align left text to left and right text to right
Expand property , this should make all columns equal in size and give you a gap between.
Padding , another way to force a gap.
you could also change Cell background for left and right hand cells , that would make separation clearer
I think you just want Gridview.Grid = True though
Re: Separation between columns of a GridView
Posted: Friday 9th September 2022 11:34am
by gambafeliz
Thank you all you have said helps.
Honestly, the problem is me, how strange, right?
After looking and looking at my code, I notice that I have the automatic width but just before presenting it there is code that I lost that changes that specific width to fixed and for that the problem, please, I apologize.
I have already solved it.
By the way, how do I close this post?