Click here to Skip to main content
15,888,157 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: User Control Pin
Tej Aj18-Jul-10 23:37
Tej Aj18-Jul-10 23:37 
QuestionDisplay data of User Control from another user control button click Pin
SatyaKeerthi1516-Jul-10 3:00
SatyaKeerthi1516-Jul-10 3:00 
AnswerRe: Display data of User Control from another user control button click Pin
Peace ON16-Jul-10 3:03
Peace ON16-Jul-10 3:03 
AnswerRe: Display data of User Control from another user control button click Pin
T M Gray16-Jul-10 9:04
T M Gray16-Jul-10 9:04 
QuestionEntity Framework Pin
future383916-Jul-10 1:14
future383916-Jul-10 1:14 
AnswerRe: Entity Framework Pin
Peace ON16-Jul-10 1:28
Peace ON16-Jul-10 1:28 
Questionpaging without sqlDataSource control.. Pin
dittu715-Jul-10 19:18
dittu715-Jul-10 19:18 
AnswerRe: paging without sqlDataSource control.. Pin
Peace ON15-Jul-10 19:23
Peace ON15-Jul-10 19:23 
Try following code.

C#
//For paging a Gridview manually we have to handle the Gridview’s PageIndexChanged Event.  
//In the event we need to change the PageIndex of Gridview to the page that user has clicked and again bind the Gridview.

protected void gvPaging_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
   gvPaging.PageIndex = e.NewPageIndex;
   gvPaging.DataBind();
}

//This is all you need to do to make manual paging in the Gridview.
//For manually sorting in Gridview we need to handle the Sorting event of Gridview. Here is the code to do it.

protected void gvSorting_Sorting(object sender, GridViewSortEventArgs e)
{
   DataTable dtSortTable = gvSorting.DataSource as DataTable;

   if (dtSortTable != null)
   {
      DataView dvSortedView = new DataView(dtSortTable);
      dvSortedView.Sort = e.SortExpression + " " + getSortDirectionString(e.SortDirection);

      gvSorting.DataSource = dvSortedView;
      gvSorting.DataBind();
   }
}

private string getSortDirectionString(SortDirection sortDireciton)
{
   string newSortDirection = String.Empty;
   if(sortDirection== SortDirection.Ascending)
   {
       newSortDirection = "ASC";
   }
   else
   {
      newSortDirection = "DESC";
   }
   return newSortDirection
}




HTH
Jinal Desai - LIVE
Experience is mother of sage....

QuestionHow to create a web application project in the local IIS [SOLVED] Pin
fjparisIII15-Jul-10 15:05
fjparisIII15-Jul-10 15:05 
AnswerRe: How to create a web application project in the local IIS Pin
Not Active15-Jul-10 18:43
mentorNot Active15-Jul-10 18:43 
GeneralRe: How to create a web application project in the local IIS Pin
fjparisIII16-Jul-10 5:34
fjparisIII16-Jul-10 5:34 
GeneralRe: How to create a web application project in the local IIS Pin
Not Active16-Jul-10 5:59
mentorNot Active16-Jul-10 5:59 
GeneralRe: How to create a web application project in the local IIS Pin
fjparisIII16-Jul-10 7:29
fjparisIII16-Jul-10 7:29 
AnswerRe: How to create a web application project in the local IIS Pin
Abhijit Jana15-Jul-10 19:21
professionalAbhijit Jana15-Jul-10 19:21 
GeneralRe: How to create a web application project in the local IIS Pin
fjparisIII16-Jul-10 11:25
fjparisIII16-Jul-10 11:25 
QuestionAuto Ellipses Label in ASP.Net Pin
PDTUM15-Jul-10 8:34
PDTUM15-Jul-10 8:34 
AnswerRe: Auto Ellipses Label in ASP.Net Pin
NeverHeardOfMe15-Jul-10 8:58
NeverHeardOfMe15-Jul-10 8:58 
AnswerRe: Auto Ellipses Label in ASP.Net Pin
PDTUM15-Jul-10 10:57
PDTUM15-Jul-10 10:57 
GeneralRe: Auto Ellipses Label in ASP.Net Pin
Not Active15-Jul-10 14:08
mentorNot Active15-Jul-10 14:08 
QuestionNeed to remove empty space from GridView due to hidden columns Pin
Adam Brown 315-Jul-10 5:43
Adam Brown 315-Jul-10 5:43 
AnswerRe: Need to remove empty space from GridView due to hidden columns Pin
thatraja15-Jul-10 8:20
professionalthatraja15-Jul-10 8:20 
GeneralRe: Need to remove empty space from GridView due to hidden columns Pin
Adam Brown 316-Jul-10 3:49
Adam Brown 316-Jul-10 3:49 
GeneralJavaScript action result no longer working after converting to partial view. Pin
Brady Kelly15-Jul-10 5:00
Brady Kelly15-Jul-10 5:00 
QuestionHow to dynamically create an Excelworkbook with two sheets Pin
antony beula15-Jul-10 3:12
antony beula15-Jul-10 3:12 
AnswerRe: How to dynamically create an Excelworkbook with two sheets Pin
Peace ON15-Jul-10 4:05
Peace ON15-Jul-10 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.