Reputation: 135
I have attached screen shot here. http://imageshack.us/photo/my-images/836/abcpqr.png/. In my 1st 2 column 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.
Upvotes: 0
Views: 698
Reputation: 135
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"),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.
Upvotes: 0
Reputation: 57312
you can store content at client side by html5 storage
This means you can start using the API’s sessionStorage and localStorage
here is tutorial to learn how to use
Upvotes: 1