Тёмный

Webgrid Paging, sorting and filtering in ASP.Net MVC 

sourav mondal
Подписаться 27 тыс.
Просмотров 155 тыс.
50% 1

Today, In this tutorial I will show you webgrid Paging, sorting and filtering functionality in asp.net MVC application.
It is an essential approach to using paging, sorting and filtering technique in applications where a lot of data to be loaded from a database. So here in this article, I have tried to show how we can do this just following few simple steps.
Visit : www.dotnetawesome.com/2016/11/...

Хобби

Опубликовано:

 

18 ноя 2016

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 117   
@gianlucasirianni4019
@gianlucasirianni4019 5 лет назад
thank you so much. your're tutorial helped me solve an issue that took me two days to figure out and various tutorials. I knew it was as simple fix and you demonstrated it to me. Thanks again. Gianluca
@MohamedSuleiman
@MohamedSuleiman 7 лет назад
Excellent topic and explanation. many thanks.
@andrewstyle22
@andrewstyle22 7 лет назад
Great tutorial. Thanks you very much. Happy New Year.
@SkeChucky
@SkeChucky 6 лет назад
Thank you. You’re so helpful .
@saleemsajid9908
@saleemsajid9908 7 лет назад
You are Genius bro !!! Thanks for Such a nice tutorial :)
@PrivatePyle9999
@PrivatePyle9999 7 лет назад
Great demo!
@nabilnawaz9332
@nabilnawaz9332 7 лет назад
it's really great with voice explanation :) keep it up with voice recording
@EpicAyesha
@EpicAyesha 7 лет назад
new to ur chanel. great tut! make more like this
@mustansirhaji3019
@mustansirhaji3019 7 лет назад
great work keep posting video it gives more knowledge than other videos
@souravmondal45
@souravmondal45 7 лет назад
+Mustansir Haji thanks
@msrokni
@msrokni 5 лет назад
Thanks man, great !!!!
@MrLfcFernando
@MrLfcFernando 6 лет назад
Great Job!
@JoseMartinez-nt1bb
@JoseMartinez-nt1bb 3 года назад
Excelent my friend, thank you.
@rogermorera4678
@rogermorera4678 7 лет назад
Hi, I found an issue when I join this example with MVC5 default template views. When I clicked on WebSortedGrid menu option (with no dd-menu), the another drop-down menu options do not work. It seems like disabled. Does anyone know how to fix it? Tks
@saraelouaghlidi2433
@saraelouaghlidi2433 7 лет назад
Thank you so much :)
@danielchanpark5748
@danielchanpark5748 5 лет назад
Great video! Question I'm having trouble to convert to string from SQL DB. I have attribute that is DOB (date of birth) the data type is datetime in the SQL server so I can't plug in Contains (search). What method or object need to use to able to use Contains (search). Thanks!
@user-wl3ft6cc9d
@user-wl3ft6cc9d 6 лет назад
Hello! How can I add a navigation property column to the grid?
@LizzyMendivil
@LizzyMendivil 7 лет назад
Hello! Please, how would be the paging sample without Entity Framework?
@narendarsingh4672
@narendarsingh4672 5 лет назад
Sir,you are great with voice i am very sad of ur rest videos because you have not use voice .it is difficult to understand please sir in future use voice surely you have done very well and i want to learn ur every vidoes and i am very impress this vidoes thanks a lot you have explain very nice.
@rabipanda8522
@rabipanda8522 6 лет назад
great learnable
@HaiSL26
@HaiSL26 5 лет назад
When i run on my ASP. MVC 2017 it working, but when I run it on localhost IIS win 10, it jurm to error file in forder View. Please help me, how to fix it. Thanks
@rokas666
@rokas666 7 лет назад
a quick video of implementing DataTables with MVC would be great too
@BayramCeylan
@BayramCeylan 7 лет назад
Thanks a lot
@shuvotanvir9857
@shuvotanvir9857 2 года назад
Nice video
@tianyiliu3159
@tianyiliu3159 7 лет назад
Hi, sourav one little question about datatype. In select database step you write "a.FirstName.Contains(Search)" What if I have different datatype like double or datetime how can I wirte.
@loquan4039
@loquan4039 7 лет назад
call procedure sql in entity framework code first with asp.net?thanks
@studentgr3518
@studentgr3518 4 года назад
Can you pls upload video to do the same using two tables and stored procedures? Thanks
@pritimay17
@pritimay17 6 лет назад
Sir how to display int and date and time in this view?
@haroonniaz7148
@haroonniaz7148 7 лет назад
Sir, webgird and girdview same thing?
@meghamisra5622
@meghamisra5622 6 лет назад
How can I change one existing textbox into drop-downlist? my current project is working perfectly. but the person who is using it want to change one textbox to drop-down list. I used Crud operations to create this project. Now if I create new table with all the names then how can I use that table in existing views? can you please help me?
@carlreid9008
@carlreid9008 4 года назад
i have webgrid with about 100-150 records in tab view that's taking a very long time to load. The user doesn't want paging. Any suggest on to why it taking a long time to load?
@navzme
@navzme 5 лет назад
Nice thanks
@osamahlhm9074
@osamahlhm9074 7 лет назад
thanks a lot for your powerful and very useful video , please how can i insert and update batch data using this example
@krishnaparab9747
@krishnaparab9747 6 лет назад
Hi sir this functionality how to use in bootstrap table ?
@abdullahquhtani4247
@abdullahquhtani4247 4 года назад
Do you do freelance tasks?
@kavithavishwanathen6778
@kavithavishwanathen6778 7 лет назад
grid.Bind(source: Model, rowCount: ViewBag.TotalRows, autoSortAndPage: false);i m getting error on Model ...plz help rest is error free
@josephoyila6913
@josephoyila6913 7 лет назад
pls help me l want to installed sql but this error The following error has occurred: when trying to installed it , l search google the solution offer did not solve it Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
@SixySix704
@SixySix704 7 лет назад
good 1
@AlucarDoMalxD
@AlucarDoMalxD 7 лет назад
Thanks
@KJ4000
@KJ4000 6 лет назад
Gr8 tutorial sir :) Cannot call action method 'System.Collections.Generic.IEnumerable`1[RTTT.Models.ServiceInfo] GetServiceRelated(System.String, System.String, System.String, Int32, Int32, Int32 ByRef)' on controller 'RTTT.Controllers.serviceController' because the parameter 'Int32& totalRecords' is passed by reference. Parameternavn: methodInfo - some problem with the fact that TotalRecords is used with out in ? Does anyone know what to do here?
@alpeshvalvi8894
@alpeshvalvi8894 6 лет назад
please make video for "Card view List with image from database in asp.net MVC"
@rahulprasad7939
@rahulprasad7939 4 года назад
Hi sir I'm facing error like System.ArgumentNullException: 'Value cannot be null. Parameter name: source
@saikiran538
@saikiran538 6 лет назад
hello, bro. Please make a video on bootstrap table server pagination and search. Thanks in Advance
@balthierspark382
@balthierspark382 5 лет назад
Hello, I just wondering why my @grid.PagerList is having an error (does not contain definition for 'PageList' and no accesssible extension 'PageList') Codes: @grid.PagerList(mode: WebGridPagerModes.All, paginationStyle: "pagination pagination-small pagination-right")
@souravmondal45
@souravmondal45 5 лет назад
Have you added the WebGridExtensions.cs class?
@Prateekpushpad-lo7kx
@Prateekpushpad-lo7kx 2 года назад
Nice video really helpful. Can you please me how can I download only filtered data
@poojasharma-li4pr
@poojasharma-li4pr 6 лет назад
great tut. but when i am run code, search box are not shown
@SanjuPatel-qw1lf
@SanjuPatel-qw1lf 4 года назад
WebGridExtensions.cs Github link not open( it will throw 404 error ), can you check and update once ....
@meghamisra5622
@meghamisra5622 7 лет назад
When I am clicking on Submit button it is not searching anything what should I do? Am I missing something @using (Html.BeginForm("Index","Abc", FormMethod.Get)) here after Index do I have to give table name?
@souravmondal45
@souravmondal45 7 лет назад
+Megha Misra check your textbox name. It should match with the parameter you added in your controller action.
@mominakhan8064
@mominakhan8064 7 лет назад
i am trying to add this search code in already existing controllers, // GET: Locations public ActionResult Index(string search="") { var data = GetAdmins(search); return View(data); //return View(db.Locations.ToList()); } it works (Y) , but failed at the controllers having some foreign key elements like " public ActionResult Index() { var complains = db.Complains.Include(c => c.department).Include(c => c.employee).Include(c => c.engineer).Include(c => c.locations); return View(complains.ToList()); } how can i include these values to your code??
@mominakhan8064
@mominakhan8064 7 лет назад
this is the compilation error, 'IEnumerable' does not contain a definition for 'locations' and no extension method 'locations' accepting a first argument of type 'IEnumerable' could be found (are you missing a using directive or an assembly reference?) Line 24: Line 25: Line 26: @Html.DisplayNameFor(model => model.locations.Location_Name) Line 27: Line 28:
@GypsyGears
@GypsyGears 4 года назад
How the orderby is working with a string input? Orderby generally works like this _list = _list.OrderBy(a => a.EmailID).ToList();
@bloodeyhell7026
@bloodeyhell7026 6 лет назад
this is absolutely crazy... i still prefer web forms than this mvc. what if i have upto 200 pages each of them needing a grid. is this what i would go through over and over again?
@thefamilyexpress8426
@thefamilyexpress8426 7 лет назад
Showing error at select in Home Controller 'invalid expression term' i am using VS2012 premium and SQL server 2008R2 and I used DB from SQL server instead of Local Db, any suggestion please help.
@nikhilmauje5663
@nikhilmauje5663 5 лет назад
If there exist an image in datatable then how can we display it in grid ? new to MVC so plz help..
@souravmondal45
@souravmondal45 5 лет назад
Pleas checkout this link ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QVYqc6CpKxE.html
@alexabc2012
@alexabc2012 6 лет назад
hola me puedes enviar este ejemplo por favor DTB...!!!
@meghamisra5622
@meghamisra5622 6 лет назад
getting error on @grid.PageList(mode: WebGridPagerModes.All, paginationStyle: "pagination pagination-small pagination-right") saying webgrid does not contain a definition for PageList and no extension method 'PagerList'accepting a first argument of type 'WebGrid' could be found (are you missing a using directive or an assembly reference)
@souravmondal45
@souravmondal45 6 лет назад
Have you added the class WebGridExtensions.cs see step 6 from here: www.dotnetawesome.com/2016/11/webgrid-paging-sorting-filtering-aspnet-mvc.html
@meghamisra5622
@meghamisra5622 6 лет назад
Thanks now it looks good. I But I got another problem data in the table is repeating. If there are 10 records of one employee with different data i am getting 10 records but those 10 are not different one record repeating 10 times So the number of records are correct but the value of a record is not right. how can I fix it?
@kljesintha8910
@kljesintha8910 2 года назад
@@souravmondal45 please help me to download it's shows no such link available in git hub
@DineshKumar-vu4sg
@DineshKumar-vu4sg 7 лет назад
Where you have added connection string?
@souravmondal45
@souravmondal45 7 лет назад
+Dinesh Kumar it's added in the web.config file. This is done when we have added entity model in our application. You can see there should be a connection string with the MyDatabaseEntities key name.
@marccelofuentes
@marccelofuentes 7 лет назад
How align the different cells, example, a currency field, to the right?
@souravmondal45
@souravmondal45 7 лет назад
you can do in this 2 way 1. write a css class and then add style for that column which want to align right .alignright { text-align: right; } @grid.GetHtml(columns: grid.Columns( grid.Column("Amount", "Amount", style:"alignright"), ... 2. Suppose you have 5 column in your webgrid and you want to align right 3rd column .... tr.webgrid-row-style td:nth-child(3) { text-align: right; }
@linhmaichi3575
@linhmaichi3575 7 лет назад
If you using bootstrap you can add like this: grid.Column(columnName: "Amount", header: "Amount", format: (item) => string.Format("{0:c}", item.Salary), style: "text-right")
@vijaykumar883
@vijaykumar883 7 лет назад
great video, bro can you few below points - How we manage page scroll - Is Grid Bootstrap ?
@souravmondal45
@souravmondal45 7 лет назад
can you please explain a little more? I can not understand what you mean by "manage page scroll"
@vijaykumar883
@vijaykumar883 7 лет назад
How we manage page scroll I mean to say when you need to show more than 500 rows in a each page of grid. it should shows scroll in grid to view 1st 500 record. not scroll on whole page. Is Grid Bootstrap ? And when Try to See Grid on 320X480 Screen is doesn't shows more than 3-4 columns in a one screen shot. it should show all column in 1 screen. Please confirm if got requirement
@vijaykumar883
@vijaykumar883 7 лет назад
Hi I didn't get any revert on this
@arameshkumar5072
@arameshkumar5072 4 года назад
webgrid replacement not availble in github
@RajaBabu-qn5ze
@RajaBabu-qn5ze 7 лет назад
x = x.OrderBy(sort + "" + sortdir); Lamda expression parse not handled by the user code ,plzz give me answer
@souravmondal45
@souravmondal45 7 лет назад
+Raja Babu you need to add a reference of system.data.linq.dynamic
@RajaBabu-qn5ze
@RajaBabu-qn5ze 7 лет назад
plzz write expression
@souravmondal45
@souravmondal45 7 лет назад
www.dotnetawesome.com/2016/11/webgrid-paging-sorting-filtering-aspnet-mvc.html Please follow Step-7: Add reference of System.Linq.Dynamic.
@meghamisra5622
@meghamisra5622 7 лет назад
Can I add a delete button in the table to delete a row?
@souravmondal45
@souravmondal45 7 лет назад
RU-vid Video : ru-vid.com?o=U&video_id=UDf-VjmlYMs Website : www.dotnetawesome.com/2015/05/part-1-how-to-implement-basic-crud-functionality-with-EF-and-MVC4-application.html
@meghamisra5622
@meghamisra5622 7 лет назад
Thank you for your reply I will check it and let you know if I have any other problem. Thanks again One more thing in my grid I am fetching data from Sql view(created view to get data from multiple table) and I am just assuming if delete will work with that
@khanprince34
@khanprince34 2 года назад
Search krney k baad webgrid me data bind hota hai, but jab pagination next krta hu to data default aajata hai. How to fix pls help
@prakashbhavaraju9597
@prakashbhavaraju9597 Год назад
Hi brother thanks for this. But the github you provided is not working here. Kindly share the code source. Brother...
@gurhansenek4628
@gurhansenek4628 7 лет назад
Iis server is not running when the application is published
@souravmondal45
@souravmondal45 7 лет назад
+Gurhan Senek can you explain a little more about the problem or if you can send me the error message....
@hfreeman828
@hfreeman828 7 лет назад
Can you reply here where is the search code in controller.
@souravmondal45
@souravmondal45 7 лет назад
www.dotnetawesome.com/2016/11/webgrid-paging-sorting-filtering-aspnet-mvc.html See step 9, here I have used where clause for filter var v = (from a in dc.Employees where a.FirstName.Contains(search) || a.LastName.Contains(search) || a.EmailID.Contains(search) || a.City.Contains(search) || a.Country.Contains(search) select a );
@hfreeman828
@hfreeman828 7 лет назад
Thank you for the link sir.
@wisygn4663
@wisygn4663 5 лет назад
man, u r a fucking god
@SOORAJV
@SOORAJV 7 лет назад
Bro, why don't you can use odata? that way you can get rid of all these custom parameters.now a days it is common practice.😀
@souravmondal45
@souravmondal45 7 лет назад
+SOORAJ. V thanks for your suggestion. I will :)
@kevinalexander5812
@kevinalexander5812 7 лет назад
Sooraj, can you explain how you can get the custom parameters from odata. I'm guessing odata meaning object data. I'm a newbie with MVC, today is day 1.
@jackryan3487
@jackryan3487 7 лет назад
i've got a bit of an issue when it comes to typing the list command any suggestions
@souravmondal45
@souravmondal45 7 лет назад
+Jack Ryan please explain a little more about the issues.
@jackryan3487
@jackryan3487 7 лет назад
as soon as i type public List the word "Employee" is supposed to turn blue as shown in your tutorial but in my case it doesn't. please help me
@souravmondal45
@souravmondal45 7 лет назад
+Jack Ryan have you added entity model in your application also please check table/entity class name. Or if you can share your project then I can take a look.
@mohammadfasih7752
@mohammadfasih7752 7 лет назад
you have written table / entity class name Employees but in method you write public List there should be Employees ...we are getting confused
@mohammadfasih7752
@mohammadfasih7752 7 лет назад
what we are supposed to write between public List.. table name or something else???
@vidyanandsingh806
@vidyanandsingh806 5 лет назад
Nice video but it's most better if access record in excel
@jyotirbalaparhi8472
@jyotirbalaparhi8472 7 лет назад
sir,your most of video was not audible ..
@Ishraq_Madi
@Ishraq_Madi 7 лет назад
your website not working 😭😭😢
@nabilnawaz9332
@nabilnawaz9332 7 лет назад
why your website is not working ?
@souravmondal45
@souravmondal45 7 лет назад
where you are from?
@kiloeras1
@kiloeras1 6 лет назад
Not working for me
@dileephpentapati8535
@dileephpentapati8535 7 лет назад
sorry...I got link. Thanks
@wilkinvasquez9166
@wilkinvasquez9166 7 лет назад
Please share the excel file to practice.
@souravmondal45
@souravmondal45 7 лет назад
you want the sample data? you can get the database script (with data) from here demo.dotnetawesome.com/webgrid-paging-sorting-filtering-aspnet-mvc
@wilkinvasquez9166
@wilkinvasquez9166 7 лет назад
Thanks!!!! and very good explanation, it helped me a lot.
@thefamilyexpress8426
@thefamilyexpress8426 7 лет назад
Error Solved...
@aniketbhattacharya2494
@aniketbhattacharya2494 7 лет назад
Thanks for the demo.Can u pls share your email id.
@andreaguerra9965
@andreaguerra9965 6 лет назад
bullshit :(
Далее
Part 1 - Basic Inplace editing in asp.net MVC webgrid
46:38
Full CRUD operation using datatables in ASP.NET MVC
1:07:51
Brutally honest advice for new .NET Web Developers
7:19
jQuery Ajax In Asp.Net MVC - CRUD Operations Using JSON
1:21:13
The Logging Everyone Should Be Using in .NET
15:34
Просмотров 52 тыс.
Best the best 2024❤️ Subscribe
0:14
Просмотров 5 млн