YajraBox Laravel Datatable | Row Editing Options #3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone and welcome to bit films in this episode we are going to see the yeah a box with row editing options there are four different row editing options and that will reflect on our yatra level data table so the first thing I'm going to tell you is the giving a class to each row so a very good example is given on the documentation of row class is this one so it's just simple thing which is just going to give you like if I do this and paste it so let me explain you so it says okay I'm going to add a class to each row but the class has to be somewhat dynamic it first checked the ID if ID is even it will say alert success otherwise it will say alert warning so just by saying this statement if I go and refresh this page you can see it's super cool to have these colors in each rows so that's the great important thing so what if I say danger so for every odd numbers row we have red color so this is the one-way but you can use the blade yes you can use the blade on your controller also so you can see you just need to wrap the blade inside single quote or double coating of your system and yeah it's just a simple blade syntax so again giving the same result so this is the row class but what is row ID so let's check and give this row ID so this is if if I go and inspect this element you can see for each row now we have alert warning or alert success depending upon the ID that's what I have given here so if I delete this and refresh this page once more going to inspect it you can see we don't have an class of alert success or alert warning so let's make it here and now I'm going to paste set row ID so each row will assigned an ID and that idea is actually the user ID so if I again refresh this page and go to inspect and the element and each row is now having the ID this is going to be useful by data table when it is indexing when it is searching anything that's very easy by having this ID similar to ID we have we can give the attribute so what attribute yes this color attribute I'm not going to use this one because a cool thing is there you can see it is left oriented what if I provide as here a line of center so if I do this yeah it is like this so why not use this system so I'm going to copy this and paste it here now instead of color I will say a line and I'm not going to do any kind of calculation or anything just I am going to say Center and you can just do this like here and as soon as i refresh everything in this data table is now centered so how cool is and how easy to set up all these rules and the last important part is having data row data so yeah you can use this or it is more clear on the blade part so I'm going to have these things and let's just delete this and let's just only have the name so you can see the name data name is actually row name but where it is going to reflect it's not available here on this table row it's not available here but if I go to the network tab and the edge X call the data is here for each data now we have the raw data so on the row data we have a data name which is prefixes with row and - so instead of name just having this what we can do we can change it we can say data is actually DT underscore row data dot data - name so is that correct DT and at school row data then data - name so if I now refresh yeah it is prefixes with row so this means you can make changes on your existing data and you can actually load other data also so these are the four things related to row editing and these are very very important and if you have liked this episode please go and share with your friends if you have not subscribed go and subscribe to this channel and hit the bell again to get instant notification like bit fumes on Facebook Twitter and Instagram we will meet in the next episode till then good bye
Info
Channel: Bitfumes
Views: 16,926
Rating: undefined out of 5
Keywords: datatable, yajrabox, laravel datatables, laravel datatables tutorial, laravel datatables ajax, datatable laravel pagination, datatable laravel ajax, datatable laravel 5.6, yajra datatables laravel 5.6, yajra datatables laravel 5.5, yajrabox laravel, yajrabox datatables, laravel yajra datatable example, yajra datatables laravel, datatables, datatables tutorial, datatables jquery tutorial
Id: PqzSdNU6tuQ
Channel Id: undefined
Length: 5min 15sec (315 seconds)
Published: Thu Oct 25 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.