Kivy Tutorial 10 - Creating DataTable | KivyMD

preview_player
Показать описание
In this video, we are going to create a table that can contain data in the form of rows and colums. We are also going to be making it mobile friendly and adding checkboxes.

Next video - Creating Toolbars

#python #kivy #pythongui
Рекомендации по теме
Комментарии
Автор

Nice tutorial man..Kindly make a video where a user can add data to the table...or otherwise connecting the table to a database

essentialgee
Автор

The king returns. Love your videos man keep it up!

CapsLock
Автор

how to limit the characters displayed in datatable.. what if need to display only first 5 letters

divakarnayak
Автор

I'm unable to create a DataTable due to this error "ValueError: is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']" what to do?

jayzeenator
Автор

Does this work as a doc string
<screenname>:
Name:”screenname”
MDDataTable:
Parameters:

? It keeps giving me an error?

And is it away to pass data from a list /csv into the rows of a datatable ?

HeroLove
Автор

For those who have an issue ValueError: is set to an invalid option 'vertical':
Solution:
1. hover a mouse cursor over MDDataTable in your file by holding CTRL and click on appeared hyperlink.
2. datatables.py will be opened in your editor. Switch to it, go: Edit - Find - Find (in PyCharm) and type in 'vertical'
3. look for:
TableRecycleGridLayout:
orientation: "vertical"
4. Change 'vertical' to 'lr-tb'
Run the app, it must work
5. Try others: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] and comment how that works for you.

keymediastudioitself
Автор

Hey how can I add a data table to a second screen/ access this from the kv language

tiffanycox
Автор

I get this error in the first time I try to run the code Value Error:
Table Recycle Grid Layout .orientation is set to an invalid option 'vertical'. Must be one of: [
can anyone help me out?

arrestted
Автор

Hello, I try to run the table part but I got the below error
Traceback (most recent call last):
File "E:\learn python\my example\newevn\lib\site-packages\kivy\lang\builder.py", line 705, in _apply_rule
setattr(widget_set, key, value)
File "kivy\weakproxy.pyx", line 35, in
File "kivy\properties.pyx", line 498, in
File "kivy\properties.pyx", line 542, in kivy.properties.Property.set
File "kivy\properties.pyx", line 533, in kivy.properties.Property.set
File "kivy\properties.pyx", line 1253, in
ValueError: is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "e:\learn python\my example\kivymd table.py", line 22, in <module>
DemoApp().run()
File "E:\learn python\my example\newevn\lib\site-packages\kivy\app.py", line 949, in run
self._run_prepare()
File "E:\learn python\my example\newevn\lib\site-packages\kivy\app.py", line 919, in _run_prepare
root = self.build()
File "e:\learn python\my example\kivymd table.py", line 18, in build
table=MDDataTable(column_data=[('Food', dp(30)), ('Calories', dp(30))])
File "E:\learn python\my example\newevn\lib\site-packages\kivymd\uix\datatables.py", line 927, in __init__
self.table_data = TableData(
File "E:\learn python\my example\newevn\lib\site-packages\kivymd\uix\datatables.py", line 488, in __init__
super().__init__(**kwargs)
File "E:\learn python\my example\newevn\lib\site-packages\kivy\uix\recycleview\__init__.py", line 409, in __init__
super(RecycleView, self).__init__(**kwargs)
File "E:\learn python\my example\newevn\lib\site-packages\kivy\uix\recycleview\__init__.py", line 201, in __init__
super(RecycleViewBehavior, self).__init__(**kwargs)
File "E:\learn python\my example\newevn\lib\site-packages\kivy\uix\scrollview.py", line 539, in __init__
super(ScrollView, self).__init__(**kwargs)
File "E:\learn python\my example\newevn\lib\site-packages\kivy\uix\widget.py", line 359, in __init__
self.apply_class_lang_rules(
File "E:\learn python\my example\newevn\lib\site-packages\kivy\uix\widget.py", line 463, in apply_class_lang_rules
Builder.apply(
File "E:\learn python\my example\newevn\lib\site-packages\kivy\lang\builder.py", line 541, in apply
self._apply_rule(
File "E:\learn python\my example\newevn\lib\site-packages\kivy\lang\builder.py", line 710, in _apply_rule
raise BuilderException(rule.ctx, rule.line,
Parser: File "<inline>", line 113:
...
111: height: self.minimum_height
112: width: self.minimum_width
>> 113: orientation: "vertical"
114: multiselect: True
115: touch_multiselect: True
...
ValueError: is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']
File "E:\learn python\my example\newevn\lib\site-packages\kivy\lang\builder.py", line 705, in _apply_rule
setattr(widget_set, key, value)
File "kivy\weakproxy.pyx", line 35, in
File "kivy\properties.pyx", line 498, in
File "kivy\properties.pyx", line 542, in kivy.properties.Property.set
File "kivy\properties.pyx", line 533, in kivy.properties.Property.set
File "kivy\properties.pyx", line 1253, in



I try to put like this
table = MDDataTable(orientation="lr-tb",
pos_hint={'center_x': 0.5, 'center_y': 0.5},
size_hint=(0.9, 0.6),
column_data=[("Food", dp(30)), ("Calories", dp(30))],
row_data=[("Burger", "300"), ("Oats", "50")])

but It still not work. Could you please tell me what I am supposed to do to fix it? Thank you

thao
Автор

I continue to get "ValueError: is set to an invalid option 'vertical'. Must be one of: ['lr-tb'" when I try to run the first table. Do you have any tips?

rubbedlung
Автор

Sir please help... I beg you I need help.. I have created a apk using kivy and buildozer but there are some errors.. So please may I contact you???

CrisonHews
Автор

You are the best in this field. Thanks a lot for this tutorial. So, please please please, can you make a tutorial with kivymd connect with sql ?

ici
Автор

Hi man. Thanks a lot. I use py 3.8 when I press run it exited with 0. Will it ever support 3.8? Is there a tweak to fix it? My code has no error btw

ardatekinalp
Автор

hey sir, i have an issue here actully i could not find datatables in kivymd
could u help me...

abhijitshinde
Автор

Thanks for the video! Do you know if I can change the height of the rows in a data table?

joefreundt
Автор

Sir back again with a doubt :)
Can u please guide me on how to display an in-memory image in kivy...
as I don't want to save the image. Is there something from which we can display an image directly from base64

dhruvlohar
Автор

Bro, I am facing problem to perform action on other buttons that are build in same screen where the mddatatable is build by .py file and button are build by .kv file. please tell me how can i resolve this problem .

bhanusharma
Автор

Waiting for next video !!
and full app development series....

abhijitshinde
Автор

sir, i am confused.. i wanna to go learn android app developement. So suggest me which one i learn. Kivy python or android studio

aasansolution
Автор

What if we want that values to be user given inputs ?

bharadwajchivukula