I find It very annoying when adding row number to a query result, espesially when you're working with different RDMS like Oracle or SQL Server. They have their own syntax for row numbering. But when you use that in a GridView or DataGrid, it will be a piece of cake. You can try using this technique in just like example :
<Columns>
<asp:TemplateColumn HeaderText="No.">
<ItemTemplate>
<asp:Label runat="server" ID="LabelNumber"
Text="<%# Grid1.PageSize*Grid1.currentPageindex + Container.ItemIndex+1%>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
Add a new column for your Row number. And you will find Grid1 is the ID of your GridView or DataGrid.
Here's give it a try :)
Life of a programmer full of learning, errors, achievement, and passion. Every code we type is meaningful in our life. Proud to be a programmer.
Thursday, November 29, 2012
Thursday, May 10, 2012
Bug Fixing & Troubleshooting : Retrieving the COM class factory for component with CLSID Error
Hi guys... It's been a really long time since my last post. Today I'll write my bug fixing and trouble shooting experience : Retrieving the COM class factory for
component with CLSID {2F422F62-D11B-11D0-8384-00A0C92018F4} failed due to the
following error: 80040154.
This error usually occur when we develop in different type of CPU processor and OS. I've developed a web based application in windows server 2003 32-bit and then I moved them into a Windows server 2008 64-bit. And when I was running the application that execute a method from a 32-bit dll, it always shows that error message. After several hours working and searching in google, I found that there is special setting in IIS that allows application pool to execute 32-Bit applications.
So the solution steps are :
And It worked well for my problem... :)
and if you find my post is useful, please share a comment. :)
See you next time.
This error usually occur when we develop in different type of CPU processor and OS. I've developed a web based application in windows server 2003 32-bit and then I moved them into a Windows server 2008 64-bit. And when I was running the application that execute a method from a 32-bit dll, it always shows that error message. After several hours working and searching in google, I found that there is special setting in IIS that allows application pool to execute 32-Bit applications.
So the solution steps are :
- Press ctrl + run. (to open Run)
- Type inetmgr then press enter ( to Open IIS)
- Expand the server name tree and you'll find Applications Pool.
- In the right side of the view, choose the application pool that your application using.
- And in the most right panel there is an Advanced Settings under the Edit Application Pool group.
- There'll appear an Advanced Settings dialog, and change the Enable 32-Bit Application value into True.
And It worked well for my problem... :)
and if you find my post is useful, please share a comment. :)
See you next time.
Subscribe to:
Posts (Atom)
Finally, C# 9 record, the equivalent of Scala's case class
While C# is a wonderful programming language, there is something that I would like to see to make our life programmer easier. If you are fam...
-
I'm using git as my version control for my unity projects. In my second project, I have problem with vast amount of file changes generat...
-
While C# is a wonderful programming language, there is something that I would like to see to make our life programmer easier. If you are fam...
-
If you are tired of being asked for a password when accessing your remote droplet servers in Digitalocean, you might consider adding an rsa ...