r_vijaykanth
Novice

Can we change the Empty records text of a listview

2363i4620BD5C6D84191B.png

0 Kudos
Reply
8 Replies
JamesKho
Novice

Re: Can we change the Empty records text of a listview

Hi @r_vijaykanth

 

  As far as I know, you can't directly edit the "No items to display" message in the list view. What you can try is to add a condition and rule to hide the view and display a custom message in a label in the parent form.

 

For e.g.

1. Create a aggregate data label to count the number of rows in the label.

2. In the parent form, create a label and display your custom message.

3. During Form Initialise, set a condition to check if row count is zero.

    If yes, Hide the view and show your custom message label and if not, vice versa.

 

Hope this helps.

Reply
Albarghouthy
Apprentice

Re: Can we change the Empty records text of a listview

Dear,

 

Drag datalable to your list and add an expression to it with the following or just add it to the text property of the datalable:

 

<script type="text/javascript"> $(document).ready(function()
{var x = document.getElementsByClassName("grid-content-cell-wrapper"); x[0].innerHTML = 'your text'; });
</script>

wish it helps

0 Kudos
Reply
r_vijaykanth
Novice

Re: Can we change the Empty records text of a listview

Hi Mustafa,

 

Thanks for the reply, but it doesn't work.

 

Regards,

Vijay.

0 Kudos
Reply
Albarghouthy
Apprentice

Re: Can we change the Empty records text of a listview

Dear,

 

I'm not sure how you applied it, here it is:

 

2367iA8652477796FCC66.png

 

Please make sure you are not missing anything

0 Kudos
Reply
r_vijaykanth
Novice

Re: Can we change the Empty records text of a listview

Thanks for the reply mustafa,

 

i tried in both ways as you mentioned.

 

i took a datalabel in the listview and copied the html into text field of the datalabel which doesn't work

 

i have this list view in a form which is opened as a subview from another form, will it make any difference?

 

Regards

Vijay.

0 Kudos
Reply
Albarghouthy
Apprentice

Re: Can we change the Empty records text of a listview

Hi,

 

Well, it should work anyway,

 

let me show you exactly what I have done:

 

Go to the list view it self and drag data lable 

 

2371i2A206D759C493EF2.png

 

NOTE: sometimes it happen that the opening tag (<) get lost when you paste  it, make sure you have it 

 

let me know the results 

0 Kudos
Reply
Mel2
Novice

Re: Can we change the Empty records text of a listview

It is working for me when I just run the View, however, when I run the form that the view is on, the default text displays.  How else can we tweak the javascript so that we can directly reference the view by name?

0 Kudos
Reply
Albarghouthy
Apprentice

Re: Can we change the Empty records text of a listview

Hi,


 


I am able to  change the text using the script below:


<script>
$(".grid-content-cell-wrapper").html('List is Empty');
</script>

Transfer the script to a data label when the form is INITIALIZED 


**Make sure you check the Literal property of the data label


 


You will need to create an event to change the text when the list is refreshed, see example below:


 


6793i5C6F7ADBD9C31E71.png


The first transfer action is to clear the data label and the second to transfer the script again.


 


HTH

0 Kudos
Reply