Jump to content


Calling another list view on click of a list


  • Please log in to reply
7 replies to this topic

#1 techTD

techTD

    Member

  • Members
  • PipPip
  • 10 posts

Posted 14 July 2017 - 04:16 PM

Hi All,

 

Is it possible to invoke another list when user click on "View" in a list.

 

For example vendor products are stored in a table, there are multiple vendors and multiple products for each vendor.

 

I would like to display only Vendors in a list from vendor master table. Once user clicks on vendor "View" button, it should display list of products only for that vendor with ADD/EDIT button.

 

How can we do this?

 

Regards

TD



#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 15 July 2017 - 06:47 PM

Well - you surely can do the same.

 

unset the default view.

Add a new action - view..

link the same with the another view ... simple - you got the solution for it.

 

Happy GCing :)



#3 techTD

techTD

    Member

  • Members
  • PipPip
  • 10 posts

Posted 15 July 2017 - 08:20 PM

Well - you surely can do the same.

 

unset the default view.

Add a new action - view..

link the same with the another view ... simple - you got the solution for it.

 

Happy GCing :)

Well I am sure easy for GC expert like you Amit :) 

 

However, someone coming from data warehouse and data modeling background takes a bit of like to understand the flow and app programming.

 

Any example will be great Amit

 

Thanks a ton for your reply...

 

Cheers

TD



#4 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 16 July 2017 - 06:12 AM

Well my friend,

 

I gave you the steps.. u just have to encode it.. 

its all there with you and documentation. 

 

https://www.groceryc...ions/unset_read

https://www.groceryc...ions/add_action

 

 

Happy GCing :)



#5 techTD

techTD

    Member

  • Members
  • PipPip
  • 10 posts

Posted 16 July 2017 - 10:25 AM

Well my friend,

 

I gave you the steps.. u just have to encode it.. 

its all there with you and documentation. 

 

https://www.groceryc...ions/unset_read

https://www.groceryc...ions/add_action

 

 

Happy GCing :)

 

Got it Amit, 

 

Tried the method and it works.... thanks a ton for help :)



#6 techTD

techTD

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 July 2017 - 10:01 AM

Hi Amit,

 

I am struggling to make it work, basically I am trying to set a text box with vendor name when a user clicks on ADD, the vendor name will be read only and user can fill all other fields as the ADD form is coming from a select list as described above in my first post.

 

I am using a call back here and trying to run another query in callback to fetch vendor name but the text field is always coming blank.

//User selects Vendor here
$crud->add_action('View Menu Items', '', 'admin/menu_items','ui-icon-plus');

//when user clicks ADD
$crud->callback_add_field('vendor_menu_items.vendor_id',array($this,'add_field_callback_1'));



function add_field_callback_1(){

                $this->db->where('vendor_id',1)
                $row = $this->db->get('vendor')->row();
                 //echo $vendor->vendor_short_name;
                  return '+30 <input type="text" maxlength="50" value="'. $result->vendor_short_name. '" name="vendor_id2" style="width:462px">';
                  //echo $vendor_id;
                  //echo $row;
}


#7 techTD

techTD

    Member

  • Members
  • PipPip
  • 10 posts

Posted 17 July 2017 - 10:52 AM

Basically, how do I capture the vendor ID in callback which is passed by the list view when user clicks on a particular row in the list view.

 

I then need to query vendor table based on vendor_id so that I can get vendor name.



#8 lawsystae

lawsystae

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 29 June 2019 - 11:28 AM

Greetings All, 
 
Is it conceivable to summon another rundown when client click on "View" in a rundown. 
 
For instance seller items are put away in a table, there are numerous merchants and different items for every merchant. 
 
I might want to show just Vendors in a rundown from seller ace table. When client taps on merchant "View" catch, it should show rundown of items just for that seller with ADD/EDIT catch. 
 
How might we do this? 
 
Respects 
 
TD

 

Regards,
case management software






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users