How to loop through a ASP.Net Repeater using JQuery
-
Hi, I have a repeater with rows with different values. When i click on a row i have to show div with Repeater row values on it. Is there anyway to do this using JQuery or Client side functionality? Help on this really appreciate it.
Imran. Mohammed wrote:
Is there anyway to do this using JQuery or Client side functionality?
Yes
I know the language. I've read a book. - _Madmatt
-
Imran. Mohammed wrote:
Is there anyway to do this using JQuery or Client side functionality?
Yes
I know the language. I've read a book. - _Madmatt
-
You didn't provide any details at all so it would be difficult to give you any useful example relevant to your solution. For instance, what is in the repeater? Table rows? Button? Image?
<table>
<tr onclick=ShowRow(rowx)>
<td>
<div id=rowx>Some values</div>
</td>
</tr>
</table>function ShowRow(row)
{
$(row).show()
}
I know the language. I've read a book. - _Madmatt
-
You didn't provide any details at all so it would be difficult to give you any useful example relevant to your solution. For instance, what is in the repeater? Table rows? Button? Image?
<table>
<tr onclick=ShowRow(rowx)>
<td>
<div id=rowx>Some values</div>
</td>
</tr>
</table>function ShowRow(row)
{
$(row).show()
}
I know the language. I've read a book. - _Madmatt
My repeater is as below
<tr> <td class="dataRowTxt" width="110px"> <%# (DataBinder.Eval(Container.DataItem, "Name"))%> </td> <td class="dataRowTxt" width="70px"> <%# (DataBinder.Eval(Container.DataItem, "InterestRate","{0:0.000}%"))%> </td> <td class="dataRowTxt" width="92px"> <asp:LinkButton runat="server" class="dataRowLnk" > <%# (DataBinder.Eval(Container.DataItem, "MonthlyPayment","{0:C}"))%></asp:LinkButton> </tr>
When i click on the link button, i have to show the a div or a modal popup with values (resides at my backend) related to particular row. Hope you are clear now. -
My repeater is as below
<tr> <td class="dataRowTxt" width="110px"> <%# (DataBinder.Eval(Container.DataItem, "Name"))%> </td> <td class="dataRowTxt" width="70px"> <%# (DataBinder.Eval(Container.DataItem, "InterestRate","{0:0.000}%"))%> </td> <td class="dataRowTxt" width="92px"> <asp:LinkButton runat="server" class="dataRowLnk" > <%# (DataBinder.Eval(Container.DataItem, "MonthlyPayment","{0:C}"))%></asp:LinkButton> </tr>
When i click on the link button, i have to show the a div or a modal popup with values (resides at my backend) related to particular row. Hope you are clear now.Imran. Mohammed wrote:
(resides at my backend)
What do you mean? Are you pulling data from your ass? Have a look here http://jqueryui.com/demos/dialog/#option-modal[^]
I know the language. I've read a book. - _Madmatt
-
Imran. Mohammed wrote:
(resides at my backend)
What do you mean? Are you pulling data from your ass? Have a look here http://jqueryui.com/demos/dialog/#option-modal[^]
I know the language. I've read a book. - _Madmatt
-
Not from my ass... :laugh: I mean to say the data is at server or bind to repeater items. I have gone through the Jquery dialog, but it doesn't populate the data. Can you please help me out if you know better way of doing this?
Of course it doesn't populate anything, it isn't magic. If you need to retrieve the data from the server, then make an Ajax call. The call could return formatted html to be placed inside the div or return data to be placed in a template.
I know the language. I've read a book. - _Madmatt
-
Of course it doesn't populate anything, it isn't magic. If you need to retrieve the data from the server, then make an Ajax call. The call could return formatted html to be placed inside the div or return data to be placed in a template.
I know the language. I've read a book. - _Madmatt
-
I don't understand what your saying... sorry i am a beginner to development. my problem here is i have a div tag with asp label controls on it. By default i am not going to show it. On Page Load i will fill the repeater with all the values ( you can say with 3 rows) Each row contains Details link, if i click on the details link i have to show the div tag. When i am showing the div i have to assign the values related to particular row to labels in my div. Hope you understand.
-
I don't understand what your saying... sorry i am a beginner to development. my problem here is i have a div tag with asp label controls on it. By default i am not going to show it. On Page Load i will fill the repeater with all the values ( you can say with 3 rows) Each row contains Details link, if i click on the details link i have to show the div tag. When i am showing the div i have to assign the values related to particular row to labels in my div. Hope you understand.
Hi! I think that Mark Nischalke is only playing with you and he isn't seriously at all! Here[^] is a tutorial that I've made about jQuery, Web Methods and SQL Server Data Populating in Grid View... I hope you know a little of spanish :laugh: if not, just try to understand and apply to your web site. Looks like the same procedure but with some changes... hope it helps :laugh: ;)
-
Hi! I think that Mark Nischalke is only playing with you and he isn't seriously at all! Here[^] is a tutorial that I've made about jQuery, Web Methods and SQL Server Data Populating in Grid View... I hope you know a little of spanish :laugh: if not, just try to understand and apply to your web site. Looks like the same procedure but with some changes... hope it helps :laugh: ;)
English is the default language here. Creo que es usted quien está jugando. All of the information has been presented to the OP, learning does more than giving code.
I know the language. I've read a book. - _Madmatt
-
English is the default language here. Creo que es usted quien está jugando. All of the information has been presented to the OP, learning does more than giving code.
I know the language. I've read a book. - _Madmatt
I didn't ask which language is here! but thanks :-D este ud ayudando o no, tampoco me interesa. Solo trato de responder la respuesta a la pregunta anterior, no busco nada mas! gracias