Closed ddpdevang closed 9 years ago
Normally when submitting any report you should give the controller code for the grid, the view code, and any error stacktraces if present.
No information given, closing
def index
@invoices = initialize_grid(Invoice)
end
<p id="notice"><%= notice %></p>
<%- model_class = Invoice -%>
<div class="page-header">
<h1><%=t '.title', :default => model_class.model_name.human.pluralize.titleize %></h1>
</div>
<%= grid(@invoices, show_filters: 'always') do |g|
g.column name: 'Due Date' do |task|
h task.send("due_on")
end
g.column name: 'Status' do |task|
@statusValsMap[task.Status]
end
g.column name: 'Amount' do |task|
number_to_currency task.total*0.01, {:unit => "£"}
end
g.column name: 'Cutoff' do |task|
h task.send("cutoff_on")
end
g.column name: 'Show' do |task|
link_to('Show', task )
end
g.column name: 'Edit' do |task|
link_to('Edit',:action => 'edit', :id => task )
end
g.column name: 'Destroy' do |task|
link_to('Destroy',{ :action => 'destroy',:id =>task}, :confirm => 'Are you sure?' )
end
end -%>
<br>
<%= link_to 'New Invoice', new_invoice_path %>
Below is the screenshot of the thing on one controller where it is working:
Please Help
As it is getting more and more critical to have this working
Please copy paste the HTML source code of both pages somewhere, for instance, into github gists.
I meant the HTML code of the page, not ERB templates
Please check the links again...
Why is your page https://gist.github.com/ddpdevang/a63372bb01b7318a059a incomplete, there is no declaration, there is no html header with all <script src=""></script>
tags? Of course this page won't work.
I dont understand why that is not coming... the template for both the layout is the same then also...
Any clue on why it might not be coming
I have no idea, and why you have no layout for a certain controller has absolutely no relation to WiceGrid. WiceGrid cannot work without its JavaScript file. I help solve WiceGrid problems.
The problem that I have is my grid is working on one controller that is products while not working on the invoices controller...
Dont understand what the problem really is... DOne everything the same way...
Gem version that I am using is latest...