Same problem here... Anyone who has the solution ???
Mr programboy
Posts
-
Problem using a Multiview inside of a Formview! -
Problems with FormView in ASP.NET 3.5Hello all, I have a formview (which is bind with the result of a LINQ Query) and I want to update the datasource by clicking the "edit button" which is an ImageButton. When I click on it the page reloads but nothing happens. I added the "frmOverzicht_ItemCommand" in the code behind but this is never entered. Can someone help me out on this issue ?? Here's the code : Within the i have the following line of code : In the code-behind file i have the following function : Protected Sub frmOverzicht_ItemCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewCommandEventArgs) Handles frmOverzicht.ItemCommand If e.CommandName = "Edit" Then msgbox("ok") End If End Sub Can someone help me ?
-
Sorting problem with LinqI'm not using a WinForm but thanks :-) This topic can be closed.
-
Sorting problem with LinqNo that was too easy :p I wanted to use "late binding" for the "order by" clause and I solved this with the LINQ Dynamic Query Library. You can find the link here : http://aspalliance.com/1569\_Dynamic\_LINQ\_Part\_1\_Using\_the\_LINQ\_Dynamic\_Query\_Library.3 Just add the "Dynamic.cs" class to your data/business layer en build it. Then it is possible to use the OrderBy method where you can pass a string value.
-
Linq : Insert doesn't workMy database isn't included as a local resource. I made my database in SQL Server 2005 and then made a dataclass model to work with LINQ. Any idea what the problem can be ?
-
Linq : Insert doesn't workI use the following code in this function : public void VoegNieuwDossierToe(string pDossierNr, int pSectId) { Invordering invordering = new Invordering(); invordering.INVO_DOS_NR = pDossierNr; invordering.INVO_SECT_ID = pSectId; dc.Invorderings.InsertOnSubmit(invordering); dc.SubmitChanges(); } I don't get any error messages but the record isn't inserted in the database !! Someone who can help me ?
-
Sorting problem with LinqI have the following code : DataClassesDataContext dc = new DataClassesDataContext(); IOrderedQueryable myObject; public IOrderedQueryable ZoekDossier(string pDossierNr, string pKlantNaam, string pDeurwNaam, string pOpdrNaam, Int32 pSector, string pSortColumn) { if (string.IsNullOrEmpty(pDossierNr) & !string.IsNullOrEmpty(pKlantNaam) & string.IsNullOrEmpty (pDeurwNaam) & string.IsNullOrEmpty(pOpdrNaam)) { switch (pSortColumn) { case "Dossiernr": var myRecordSetDosNr = from invordering in dc.Invorderings join invo_klan in dc.Invordering_Klants on invordering.INVO_ID equals invo_klan.INKL_INVO_ID join klant in dc.Klants on invo_klan.INKL_KLAN_ID equals klant.KLAN_ID where klant.KLAN_NM.StartsWith(pKlantNaam) & invordering.INVO_SECT_ID == pSector select new { Dossiernr = invordering.INVO_DOS_NR, Hoofdschuld = invordering.INVO_BDR_HFD, Intrest = invordering.INVO_BDR_INT, Kosten = invordering.INVO_BDR_KOS, Klantnaam = klant.KLAN_NM }; myObject = myRecordSetDosNr.OrderBy(p => p.Dossiernr); break; ... When I bind this to a GridView the sorting is done but not in a correct way... The result is : 4, 10, 8, 12, ... So it doesn't sort the right ascending way. Anyone has an idea ? Dossiernr is a varchar(50) field in de SQL Server 2005 database Thx