Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moble option kendogrid #778

Open
johntom opened this issue Jan 30, 2018 · 3 comments
Open

moble option kendogrid #778

johntom opened this issue Jan 30, 2018 · 3 comments

Comments

@johntom
Copy link

johntom commented Jan 30, 2018

Is the mobile option supported for resoonsive display and if so what version. While it's been a while since I asked a question, I still use this library.
Hope all is well and thanks,
John

@adriatic
Copy link
Member

Hi John

As you really well know, our bridge is a KendoUI Aurelia plugin, meaning that it serves the purpose for presenting KendoUI "widgets" to your aurelia application as if they were Aurelia created components (this statement should be taken with caution, due to KendoUI incomplete UI, that results with your Aurelia application may not have access to all KendoUI widget elements).

If you check this example, knowing that mobile apps are not invented this year, is is very likely that you can access the mobile atttribute 😄

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [
     { field: "name" },
     { field: "age" },
     { command: "destroy" }
   ],
   dataSource: [
     { name: "Jane Doe", age: 30 },
     { name: "John Doe", age: 33 }
   ],
   filterable: true,
   columnMenu: true,
   mobile: true                          <=====
});
</script>

@johntom
Copy link
Author

johntom commented Jan 31, 2018

Yea, I tried that with the following k-mobile="phone", k-mobile="true", k-mobile.bind etc but grid still not responsive. On another note I've been doing all recent app developement using front-end-creator and extremely happy with results.

@JeroenVinke
Copy link
Member

Hey John, k-mobile.bind="true" should be the one. What I'd recommend is setting that attribute on the ak-grid, and then open the chrome console. After the grid loads you will see a log message in there containing the actual configuration object that was used to initialize the grid. You can check if that property is there.

If not, a bindable is probably missing, that could happen if this mobile property is new. You can work around this with <ak-grid k-options.bind="{ mobile: true }"

If the property is on there then the bridge did its job properly. You might have to contact kendo support to see what's up. Only thing I could think of is the grid being initialized on a fixed size div. If you do

<ak-grid>
<ak-col></ak-col>
<div style="some css"></div>
<ak-grid/>

In other words, if you have a div tag in the ak grid then the bridge will initialize the grid on that div, if you don't the grid adds a div in the ak grid itself and initializes on it. But if you add it yourself you can control the css of the div

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants