16,021,115 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by satej746 (Top 4 by date)
satej746
19-Jul-12 6:40am
View
I have tried this also but still it does not work ... here i am showing u my code.... pleasse help me ........
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
<table>
<tr>
<td>
<asp:TextBox ID="txt1" runat="server">
</td>
</tr>
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:GridView ID="grvDemo" runat="server" AllowSorting="true" AutoGenerateColumns="true" EnableSortingAndPagingCallbacks="TRUE">
<Triggers> <asp:AsyncPostBackTrigger ControlID="grvDemo" EventName="grvDemo_Sorting" /> </Triggers>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:GridView ID="GridView1" runat="server" AllowSorting="true" AutoGenerateColumns="true" EnableSortingAndPagingCallbacks="TRUE">
<Triggers><asp:AsyncPostBackTrigger ControlID="GridView1" EventName="GridView1_Sorting" /></Triggers>
</td>
</tr>
</table>
</div>
</form>
Partial Class Import_ETL_Popup
Inherits Syscon.Web.UI.Page.baseClass
Protected Sub Page_Load1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
bindgrid()
End Sub
Public Function bindgrid()
Dim dt As DataTable = DBHelper.ExecuteDataset(FunctionFactory.GetConnectionString(), CommandType.Text, "select user_name,password from tbl_user_mst").Tables(0)
grvDemo.DataSource = dt
grvDemo.DataBind()
Dim dt1 As DataTable = DBHelper.ExecuteDataset(FunctionFactory.GetConnectionString(), CommandType.Text, "select password,user_name from tbl_user_mst order by user_name").Tables(0)
GridView1.DataSource = dt1
GridView1.DataBind()
End Function
Protected Sub grvDemo_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles grvDemo.Sorting
Dim dt As DataTable = DBHelper.ExecuteDataset(FunctionFactory.GetConnectionString(), CommandType.Text, "select user_name,password from tbl_user_mst order by user_name desc").Tables(0)
grvDemo.DataSource = dt
grvDemo.DataBind()
End Sub
Protected Sub GridView1_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GridView1.Sorting
Dim dt1 As DataTable = DBHelper.ExecuteDataset(FunctionFactory.GetConnectionString(), CommandType.Text, "select password,user_name from tbl_user_mst order by user_name desc").Tables(0)
GridView1.DataSource = dt1
GridView1.DataBind()
End Sub
End Class
satej746
19-Jul-12 4:58am
View
I have remove this line as per ur suggestion but still it does not work.........
satej746
19-Jul-12 2:09am
View
i am using update panel but still whole page get refreshed.
<asp:UpdatePanel ID="UpdatePanel2" runat="server" updatemode="Conditional">
<contenttemplate>
<asp:GridView runat="server" ID="GvOurBookDetails" AutoGenerateColumns="false" Width="100%"
Style="margin-left: 0px" Caption="Our Book" AllowSorting="True">
<columns>
<asp:TemplateField HeaderText="<input type='checkbox' id='chkSelect' onclick='toggleSelection(this.id)'>">
<itemtemplate>
<input type="checkbox" name="recordId" önclick="javascript:setTotalAmount('GvOurBookDetails','<%#Container.DataItemIndex%>',this.checked);"
value='<%#DataBinder.Eval(Container,"DataItem.[voucher_ledger_id]")%>' />
<input type="hidden" id="amount_<%#Container.DataItemIndex %>" value='<%#iif(eval("Debit_Amount")="0.00",eval("Credit_Amount"),eval("Debit_Amount")) %>' />
<HeaderStyle HorizontalAlign="Left" CssClass="Freezing"></HeaderStyle>
<asp:TemplateField HeaderText="Voucher No." SortExpression="generated_voucher_No"
ControlStyle-CssClass="commonGridHeader " ControlStyle-Width="20">
<itemtemplate>
<%#DataBinder.Eval(Container.DataItem, "generated_voucher_No")%>
<asp:BoundField HeaderText="Date" DataField="Voucher_date" SortExpression="cheque_date" />
<asp:BoundField HeaderText="Cheque No." DataField="cheque_no" SortExpression="cheque_no" />
<asp:BoundField HeaderText="Debit Amt." DataField="Debit_Amount" SortExpression="Debit_Amount" />
<asp:BoundField HeaderText="Credit Amt." DataField="Credit_Amount" SortExpression="Credit_Amount" />
<asp:BoundField HeaderText="Ledger Narration" DataField="Narration" SortExpression="Narration"
ControlStyle-Width="32" />
<asp:BoundField HeaderText="Party Name" DataField="party_name" SortExpression="party_name"
ControlStyle-Width="15" />
<asp:BoundField HeaderText="Slip No." DataField="pay_slip_no" SortExpression="pay_slip_no" />
<asp:BoundField HeaderText="S" DataField="voucher_status" SortExpression="voucher_status"
ControlStyle-Width="4" />
<asp:TemplateField HeaderText="">
<itemtemplate>
<input type="hidden" id='hf_amt_type_ourbook
satej746
18-Jul-12 7:05am
View
No.
I am using different datasource for both the grids.
Protected Sub GvBankBookDetails_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GvBankBookDetails.Sorting
'' GvOurBookDetails.AllowSorting = False
''GvOurBookDetails.EnableSortingAndPagingCallbacks = False
If Session("orderbyText") = "" Or Session("orderbyText") Is Nothing Then
orderbyText = " desc"
ElseIf Session("orderbyText") = " asc" Then
orderbyText = " desc"
ElseIf Session("orderbyText") = " desc" Then
orderbyText = " asc"
End If
If e.SortExpression = "transaction_date" Or e.SortExpression = "Voucher_date" Then
sequenceOrder = "order by " & "Convert(DateTime, " & e.SortExpression & ", 105)" & orderbyText
Else
sequenceOrder = "order by " & e.SortExpression & orderbyText
End If
Session("orderbyText") = orderbyText
getRecords_TF()
getRecords_DF()
End Sub
Protected Sub GvOurBookDetails_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GvOurBookDetails.Sorting
''GvBankBookDetails.AllowSorting = False
'' GvBankBookDetails.EnableSortingAndPagingCallbacks = False
If Session("orderbyText") = "" Or Session("orderbyText") Is Nothing Then
orderbyText = " desc"
ElseIf Session("orderbyText") = " asc" Then
orderbyText = " desc"
ElseIf Session("orderbyText") = " desc" Then
orderbyText = " asc"
End If
If e.SortExpression = "transaction_date" Or e.SortExpression = "Voucher_date" Then
sequenceorderforourbook = "order by " & "Convert(DateTime, " & e.SortExpression & ", 105)" & orderbyText
Else
sequenceorderforourbook = "order by " & e.SortExpression & orderbyText
End If
Session("orderbyText") = orderbyText
getRecords_TF()
getRecords_DF()
End Sub