-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name Changed to MT.GridView Updated to 0.3.3
- Loading branch information
Mesut Talebi
committed
Jan 20, 2018
1 parent
f1be6df
commit 387aaed
Showing
34 changed files
with
521 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,4 +157,5 @@ $RECYCLE.BIN/ | |
|
||
|
||
#Publish Settings | ||
PublishProfiles/ | ||
PublishProfiles/ | ||
/.vs/config/applicationhost.config |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
megridview v0.3.1 | ||
megridview v0.3.3 | ||
Developed By Mesut Talebi ([email protected]) | ||
Open Source And no licence :) free to use | ||
*/ | ||
|
@@ -64,7 +64,7 @@ overflow-y: auto; | |
.gridview .gridview[data-currentview="list"] .gridview-loader { | ||
margin-top: -12px; | ||
} | ||
.gridview.gridview-loader { | ||
.gridview .gridview-loader { | ||
display: none; | ||
left: 50%; | ||
position: absolute; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%@ Application Codebehind="Global.asax.cs" Inherits="mesoft.gridview.MvcApplication" Language="C#" %> | ||
<%@ Application Codebehind="Global.asax.cs" Inherits="MT.GridView.MvcApplication" Language="C#" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System; | ||
using System.Web.Mvc; | ||
|
||
namespace MT.GridView.HtmlHelpers | ||
{ | ||
public static class GridviewHelper | ||
{ | ||
public static MvcHtmlString GridView(this HtmlHelper html, string readUrl, string gridName, | ||
Func<MvcHtmlString> filterPartial = null) | ||
{ | ||
var gridview = new TagBuilder("div"); | ||
var gridviewHeader = new TagBuilder("div"); | ||
var gridviewSearch = new TagBuilder("div"); | ||
var gridviewViewport = new TagBuilder("div"); | ||
|
||
gridview.InnerHtml = "<!--GRIDVIEW-->"; | ||
gridview.AddCssClass("gridview " + gridName); | ||
|
||
//Grid Header | ||
gridviewHeader.AddCssClass("gridview-header"); | ||
gridviewHeader.InnerHtml += @"<div class=""row""><div class=""col-sm-6"">"; | ||
|
||
gridviewSearch.AddCssClass("gridview-search"); | ||
gridviewSearch.InnerHtml = $@"<div class=""search input-group""> | ||
<input class=""form-control"" placeholder=""Ara..."" type=""search""> | ||
<span class=""input-group-btn""> | ||
<button class=""btn btn-default"" type=""button""> | ||
<span class=""fa fa-search""></span> | ||
<span class=""sr-only"">Ara</span> | ||
</button> | ||
</span> | ||
</div>"; | ||
|
||
gridviewHeader.InnerHtml+= gridviewSearch.ToString(); | ||
|
||
// Close col-sm-6 | ||
gridviewHeader.InnerHtml+= "</div>"; | ||
|
||
if (filterPartial != null) | ||
{ | ||
gridviewHeader.InnerHtml += filterPartial.Invoke(); | ||
} | ||
else | ||
{ | ||
gridviewHeader.InnerHtml += @"<div class=""col-sm-6 text-right""></div>"; | ||
} | ||
|
||
gridviewHeader.InnerHtml+="</div><!--End Of Row-->"; | ||
//End of GridView Header | ||
gridview.InnerHtml += gridviewHeader; | ||
|
||
//Gridview ViewPort | ||
gridviewViewport.AddCssClass("gridview-viewport"); | ||
gridviewViewport.Attributes.Add("id", "viewport"); | ||
gridviewViewport.Attributes.Add("data-getdata-function", readUrl); | ||
gridviewViewport.InnerHtml+= @"<div class=""gridview-canvas"" style=""min-height:400px;""> | ||
</div> | ||
<div class=""loading gridview-loader""> | ||
<img src = ""/images/loading.gif"" /> | ||
</div>"; | ||
//End of GridView ViewPort | ||
gridview.InnerHtml+= gridviewViewport.ToString(); | ||
|
||
//Gridview Footer | ||
gridview.InnerHtml+= @"<div class=""gridview-footer""> | ||
</div>"; | ||
|
||
gridview.InnerHtml += "<!-- /END OF GRIDVIEW-->"; | ||
|
||
return MvcHtmlString.Create(gridview.ToString()); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.