存储数据客户端 [英] Store Datatable Client side

查看:173
本文介绍了存储数据客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我附加了屏幕截图这里 [ ^ ]。



在我的前两列中,有一个下拉列表中的项目列表。第三列是输出列,其值取决于下拉选择的项目。



我在数据表中拥有2个下拉项目及其输出的所有组合。因为要求我不能使用服务器端处理。



所以,我想存储输出表客户端。并且取决于我想要显示从输出表到第3列文本框的输出的下拉列表值。我想用客户端(Javascript / Jquery)来实现这个目标。



所以,请帮我解决这个问题。



先谢谢。

Hi,

I have attached screen shot here [^].

In my first 2 columns, there is drop down with list of items inside it. And third column is output column, whose value is depends upon dropdown selected items.

I am having all the combinations of 2 dropdown items and its output inside a datatable. Because of requirement I cant use server side processing.

So, I want to store that output table client side. And depends on the dropdown seleceted value I want to show output from output table to 3rd column textbox. I want to achieve this using client side(Javascript/Jquery).

So, please help me how to achieve this.

Thanks in advance.

推荐答案

我得到了解决方案。它对将来的其他人有用。



我创建了隐藏的列表视图,其中只包含其中包含空白跨度的itemtempalte。并指定class to span来区分每个span并创建具有所需输出的自定义属性。例如

I got the solution. It will be useful for someone else in the future.

I have created hidden listview which contains only itemtempalte with blank span inside it. And assign class to span to differentiate each span and created custom attributes which is having desired output. e.g
<itemtemplate>
 <span id="residualMapping" class="<%# string.Format("ABC_{0}_{1}",Eval("firstdropdownValue"),<br mode="hold" />Eval("seconddropdownValue")) %>" output="<%# Eval("output") %>"> </span></itemtemplate>



并为每个下拉列表和标签分配类。最后,我处理了每次破坏变化事件。在这种情况下,我得到两个下拉列表的选定值,并使用此值我捕捉跨度和从跨度我得到其自定义属性值。我将这个值分配给输出标签。


And assign classes to each dropdown and label. And finaly i have handled each drodown change event. In this event i am getting selected value of both dropdowns and using this value i am catching span and from span i am getting its custom attribute value. And this value i am assigning to the output label.


这篇关于存储数据客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆