Dear all,
I have rectangle that I split to 4 columns and put lines and I fill in each column
with textbox
------------------------------------------------------------------------------------------------------------------------------
| Col1 | Col2 | Col3 | Col4 |
-------------------------------------------------------------------------------------------------------------------------------
Example :
Col1 => Currency
Col2 => Amount
Col3 => Value date
Col4 => Due date

sometimes, Col3 or Col4 value are "1900-01-01", so I hide Col3 and Col4. I hide Col3 and Col4 use Visibility -> Expression

But, the result is like this :
------------------------------------------------------------------------------------------------------------------------------
| Col1 | Col2 | | |
-------------------------------------------------------------------------------------------------------------------------------

the third line resembles to the second line.

so guys, please help me.

Thanks,

Kusno

I think a code sample would help diagnose the problem a bit better. Is the Rectangle a table or something? Do you expect data is those two missing columns? You may wanna to provde some more info.

jenni

It is Rectacle control that I split to for columns with using Line control and then I put Textbox control in each row.

So don't hide the columns, use a function that chooses what to set the text. Like:

<asp:TextBox id="txt1" Text='<%# Display(DataBinder.Eval(Container.DataItem, "Field")) %>' runat="server" />

<script language="vb" runat="server">
Public Function Display(ByVal databinder As String) As String
Select Case databinder
  Case > "1900-01-01"
    Return(databinder)
  Case Else
    Return("")
End Select
End Function
</script>

This way your values will be thrown into a function, and if your format is larger than 1900-01-01 then it will show, if not, the text will be "". You can also set the readonly attribute to true if needed.

Sorry SheSaidImarPragy,
This is not ASP.Net form, but Reporting Services report. But I have solved it, just like your last post.

Oops, sorry. And glad to hear you resolved it! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.