Hi, I am using a datagrid as the main display of my application. The datagrid is bound to a dataview. This dataview is constructed from a DataTable. The first column in the DataTable is of type DateTime. It is important for me that this column is of type DateTime since I want to be able to sort with respect to time, whatever time format is used. My problem is that I want the user to be able to customize the format in which the time is displayed in the first column. Any one who knows how I can accomplish this? I now about the DateTimeFormatInfo objects but I don't know where in the process to use them. Thanks in advance for any help. Rickard
RickardB
Posts
-
How do I change the apperance of datetimes in a datagrid? -
DataGrid Sortcommand doesn't workHi, I have a datagrid with sorting turned on. The datagrid sort event used to fire when I pressed the header but the column header but now it doesn't work anymore. Anyone with any idea why? Rickard
-
How go give the datagrid excel like appearance + parallell editing of cells in a datagridDo you have any other suggestion? I don't need the calculation ability in the application, at least not yet. I just want it to look more like excel (I.e. it should be better looking). Rickard
-
How go give the datagrid excel like appearance + parallell editing of cells in a datagridTwo datagrid questions: 1) Anyone who have advice on how I could make my datagrid look more excel like? 2) Is it possible to set more then one row in "edit" mode at one time? (I would like to have my whole datagrid in editmode when "edit" is pressed. Rickard
-
Pushbutton with image instead of textHi, I have posted a similar question earlier but I haven't got the answer I am looking for. I want to have a button that looks like a normal pushbutton but with an small transparant gif image instead of text in the middle. Anyone who knows how to do this? Rickard
-
date differenceI am not sure that I have understood your question correctly, but here is an example how you could get the timedifference between to dates: //Lets say we want the time difference from 2002-02-25 to today. DateTime t2 = DateTime.Now; DateTime t1 = System.Convert.ToDateTime("2002-02-25"); int years = t2.Year - t1.Year; int months = t2.Month - t1.Month; int days = t2.Days = t1.Day; Rickard - Keep Reflecting
-
Image in a buttonHow can I insert an image in a command button control? Rickard
-
Change size of edit, update and cancel buttons of a DataGrid?Hello, How can I change the size of the pushbuttons used to the Edit, Select, Update and Cancel button used in the DataGrid? Rickard
-
Control the width of datagrid columns in editmode?I am using autogenerate columns... Rickard
-
Control the width of datagrid columns in editmode?Hi, When the default settings are used for the datagrid the columns changes it width in edit mode making the whole grid look kind of ugly. Is there anyway to to control the width of the gatagrid columns in editmode? Rickard
-
Insert a control inside a datagrid cell?Hello, I would like to insert a Webserver control inside a cell in a datagrid. My datagrid is bound to a IList and the columns are generated automatically. Anyone who knows how to do this? Rickard
-
Format the string inside a ListItemHi, I would need to arrange the text property of a ListItem into columns, i.e. I need to pad the substring. Example: string 1 string 2 should become: "string 1 " "string 2 " Then I need to add them together, the result should be "string 1 string 2 " I know how to pad a string using the PadLeft command but when I try to assign the Text property of a ListItem the space between the substrings (string 1 and string 2) in this case is schrinked to a single space. The reason I want to do this is that I want to add this ListItems to a DropDownListBox and the text inside it needs to formatted into columns. Anyone who can give me any advice? R Rickard
-
Commercial datagrid that supports .NET DatasourceDear all, Anyone who knows about a good comercial .NET datagrid that supports .NET datasource? I.e. dataset as a datasource. Regards, Rickard Rickard
-
VS .NET 7.0 debugger doesn't stop att breakpoints in Application_StartHello, I am developing an ASP.NET application that does a lot of preparation work in Application_Start and Session_Start. I am using VS .NET (7.0). Suddenly my debugger want stop at breakpoints in the Application_Start or Session_Start methods, anyone who have any idea why? Rickard
-
Convert String[] to System.ArrayHello, I need to pass an array of strings to a COM object implemented in VB. The Interop interface wants a ref System.Array. How can I convert my String[] to this format in the fastest way possible? Rickard
-
Deep copy HashtableThanks! My new implementation: protected void CopyHash(ref Hashtable src, ref Hashtable dst) { MemoryStream ms= new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); //serialize source to a stream bf.Serialize(ms,src); //deserialize it to the copy ms.Seek(0,0); dst = (Hashtable)bf.Deserialize(ms); } A comment: I had to ref the destination Hashtable otherwise the result of the function was an empty Hashtable. Rickard
-
Deep copy HashtableHello, Any one who could give me an advice on how to deep copy a Hashtable in as short time as possible? My first implementation is: protected void CopyHash(ref Hashtable src, ref Hashtable dst) { dst.Clear(); Array copy = Array.CreateInstance(typeof(DictionaryEntry), src.Count); src.CopyTo(copy,0); foreach (DictionaryEntry Entry in copy) { dst.Add(Entry.Key, Entry.Value); } } Thanks Rickard
-
FileSystemObject in VB returns the wrong value when used from .NETHi, I have now debugged my application and the string seems to be alright, but it still doesn´t work, or actually it worked for a while, but suddenly the same error occured again. Could this be some kind of access problem? Could it make a difference in I run the com in process or out of process? Rickard
-
FileSystemObject in VB returns the wrong value when used from .NETHi, I have now debugged my application and the string seems to be alright, but it still doesn´t work, or actually it worked for a while, but suddenly the same error occured again. Could this be some kind of access problem? Could it make a difference in I run the com in process or out of process? Rickard
-
FileSystemObject in VB returns the wrong value when used from .NETI solved it! Found a good article on this URL http://support.microsoft.com/?kbid=811658 Rickard