Problem using jquery.dataTables.js with ASP.net Repeater and VB.net

Problem using jquery.dataTables.js with ASP.net Repeater and VB.net

S.I.DS.I.D Posts: 6Questions: 0Answers: 0
edited July 2010 in General
Hi,
I am using ASP.net repeater to generate table from database, the code behind is in vb.net.
But I am facing problem using jquery.dataTables.js with this, none of the functionalities (filtering, sorting) work with my table
Is there any way I can go about it....Please Help

My code for Repeater:-

[code]





P.O. Date
P.O. Number
Vendor
# of Items
Status






<%#Eval("PO_DATE")%>
<%#Eval("PO_NO")%>
<%#Eval("Vendor")%>
<%#Eval("PO_ItemCount")%> units
<%#Eval("STATUS")%>







[/code]

and the code behind is a VB.net file
[code]
dashPo.DataSource = bal.showDashBoardPO_Details(vendorId, userRole)
dashPo.DataBind()
[/code]

showDashBoardPO_Details gets the data from store procedure.

Thanx,
S.I.D

Replies

  • SwanSwan Posts: 17Questions: 0Answers: 0
    Hello!

    Do you get any javascript errors? Have you tested the repeater without the plugin?

    I'm using beta version of DataTable with Repeater and works perfectly in all tested browsers.


    [code]





    <%-- V --%>
    Vpisna
    P
    M
    N
    K
    S
    D





    <%-- <%# Eval("v") %>--%>

    <%# Eval("vpisna") %>
    <%# Eval("pS")%> <%#Eval("iS) %>
    <%# Eval("p") %> <%# Eval("ime") %>
    <%# Eval("n")%>
    <%# Eval("pod")%>
    <%# Eval("st")%>
    <%# Eval("da", "{0:d}")%>














    [/code]


    Maybe you forgot to write the table id?
  • S.I.DS.I.D Posts: 6Questions: 0Answers: 0
    Hey thanx Swan,

    Refering to your code I made a small change and its working now,
    I was opening and closing inside instead of outside.

    The new prob I came across is.. it is not searching for "ss" one of the item in the table
    while it successfully filters "ssd".

    Does the javascript have any issues with "ss" ?

    Cheers
    S.I.D
  • SwanSwan Posts: 17Questions: 0Answers: 0
    Hello!

    Please check this site:

    http://blueorbitsoftware.com/blog/?p=17

    Cheers.
  • S.I.DS.I.D Posts: 6Questions: 0Answers: 0
    Hi Swan,
    Thanx for the link, going thru it now..

    I have came across 1 more problem..hope this link helps me with it, if not can u guid me

    I have a two tabs showing Owner and Supplier on same page and both datatable contains are different but the columns are same, I copied the whole div and made it visible and invisible using javascripts on a click of a button (href to a tab)but wht happens is the 1st datatable shows perfectly but the 2nd one shows me the data but no fucntionality, if I swap the divs which ever is 1st works just fine, I figuredout for some reason the jquery doesnt work for 2nd div

    Am I missing any thing, or do i need to make 2 copies of Datatable.js ???

    Cheers
    S.I.D
  • SwanSwan Posts: 17Questions: 0Answers: 0
    Are you using IE8 or Firebug or something for showing javascript errors? I think the problem is there. Sorry for my late response but I'm not so familiar with JS and jQuery.

    I hope you already find the solution.
  • S.I.DS.I.D Posts: 6Questions: 0Answers: 0
    Hey Swan thanx for the reply,
    Ya I found the solution,
    No the prob is not with IE8 or firebug, I found the solution by trial & error

    What I did is....I just replicated the Jquery code in datatable.js for datatable with a different table id so now my datatables in both the tabs have different ids.

    The behind the screen prob was, whn the page was loading both the datatables were getting loaded and both had same table id, so JQuery was running for only 1 table and it wasn't considering another table with same id.

    Have a Gr8 time coding..Byee
  • usmanshabbirusmanshabbir Posts: 8Questions: 0Answers: 0
    hi i have also used jQuery Datatable with ASP.net in C# the details can be found over
    http://usmanshabbir.blogspot.com/2010/10/simplest-way-to-use-jquery-datatable-in.html
This discussion has been closed.