We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Can ejGrid place the attributes in the databinded html table into the generated grid table? Or can it update the source html table used as the databinding source.

Hello,

I would like to use the ejGrid to bind to an html table. However, the custom attributes used in the table need to be placed in the generated ejGrid table. This way, when an edit event is fired, I can access these custom attributes. Another option would be if the ejGrid would update my data-bound html table. I have attached my test code.

Attachment: SyncFusionTest_e28550fd.zip

4 Replies

MF Mohammed Farook J Syncfusion Team October 9, 2014 02:32 PM UTC

Hi Shane,

 

Based on your requirement, We have created a sample and the same can be downloaded from the link:

 

Sample Location :  WebSite5.zip

 

Please refer online demo :

 

http://js.syncfusion.com/demos/web/#!/azure/grid/DataBinding/Table

 

please refer online documentation:

 

http://help.syncfusion.com/web

 

Select => ejGrid => Concepts and Features => DataBinding => Html binding

 

please Let us know if you any queries.

 

Regards,

J.Mohammed Farook



SS Shane Swayney October 10, 2014 06:42 PM UTC

Hi Mohammed,

I have seen this demo. I based my test off of it so it doesn't help me. My question is how do I get the custom attributes used in the data source html table placed in the generated ejGrid table. Would you please look at my original uploaded example and let me know. In there you will find tags with attributes like the following:

id='237' Row_ID='236' Source_Table_ID='55'>

I need these attributes to be available to me in the generated Grid when a change event it fired in the grid.


MF Mohammed Farook J Syncfusion Team October 13, 2014 03:40 PM UTC

Hi Shane,

Currently we are working on your requirement , we will update in one business day(October 14, 2014)

please let us know if you have any queries.

Regards,

J.Mohammed Farook



MF Mohammed Farook J Syncfusion Team October 14, 2014 12:38 PM UTC

Hi Shane,

 

Thanks for your patience.

 

Based on your request , We have created a sample in “ejGrid with table binding” and the same can be downloaded from the link.

 

Please remove the unknown property in table binding. Please find the code snippet.

 

<div id="Grid"></div>

   

   

    <table id="55">

       

        <thead>

            <tr>

                <th id='57'>

                    Laptop

                </th>

                <th id='58'>

                    Model

                </th>

               

            </tr>

        </thead>

        <tbody>

         

            <tr>

                <td id="1">HP Pavilion Sleekbook</td>

                <td id="2">14-B104AU</td>

               

            </tr>

            <tr>

                <td id="3">Sony Vaio</td>

                <td id="4">E14A15</td>

               

            </tr>

        </tbody>

    </table>

    <script type="text/javascript">

        $(function () {

            $("#Grid").ejGrid({

                dataSource: ej.DataManager($("#55")),

                editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },

                toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete] },

                columns: [

                        { field: "Laptop", headerText: "Laptop Brands", width: 130 },

                        { field: "Model", headerText: "Model", width: 130 }

                    

                ]

            });

        });

 

 

Sample: SyncFusionTest.zip

 

Query : could you please tell that, why do you using unknown property in table declaration.

 

sorry for the inconvenience caused , We have misunderstood your query please explain briefly.

 

Please let us know if you have any queries.

 

Regards,

J.Mohammed Farook


Loader.
Live Chat Icon For mobile
Up arrow icon