c# - Search functionality for an Asp.net gridview without using database -
i using gridview , bind data sharepoint list.
i want know how use search functionality gridview don't have database. (and solutions see use database)
is there other solution apart jquery plug-in datatables??
kindly help! :)
i suggest search through sharepoint list, not gridview.
using (spweb web = spcontext.current.web) { splist list = web.lists["list"]; string title = "line search"; splistitemcollection items = list.getitems(new spquery() { query = @"<where><eq><fieldref name='title' /><value type='text'>" + title + "</value></eq></where>" }); if (items.count > 0) { mygrid.datasource = items.getdatatable(); mygrid.databind(); } }
Comments
Post a Comment