Jump to content

Messages on empty DBGrid


Darth Florus

Recommended Posts

Mr. Farshad:

 

1) Is possible to incorporate a message that appears centered on the dbGrid when is empty?

2) Is possible to draw the empty rows of a dbGrid?

 

Will be usefull because when the session is themed the empty rows are showed with default clBtnFace color and is confuse for the user.

 

Best Regards

post-37-0-23963700-1385500893_thumb.png

Link to comment
Share on other sites

  • 2 weeks later...

 

1) Is possible to incorporate a message that appears centered on the dbGrid when is empty?

 

 

Hi Oscar Flor

 

Try:

 

UniDBGrid1 - > UniEvents 

function beforeInit(sender)
{
  this.view.emptyText = "<div style='width:150px;margin:0 auto;'><br><h2>No records!!!</h2></div>"; 
}

Or change empty text in runtime:

UniSession.AddJS(UniDBGrid1.JSName + '.view.emptyText = "<div style=''width:150px;margin:0 auto;''><br><h2>No records!!!</h2></div>"; '+UniDBGrid1.JSName+'.getView().refresh();');

post-906-0-32789100-1386231511_thumb.png

 

Sincerely

Link to comment
Share on other sites

×
×
  • Create New...