|
|
Thank you for your help, my problem is now solved.
Sorry for the late answer ...
Patrick Meinguet
|
|
|
|
|
Sir,
I have a grid view that displays record from database. My problem is that whenever there is no record(s) from the database, it doesn't display the header of the grid? How can I display the header of the grid even if there's no record retrieved.... .NET 2005
In .net 2003 it displays the header even if there is no record(s)
/Dabuskol
-- modified at 3:38 Wednesday 14th March, 2007
Dabsukol
|
|
|
|
|
hi,
Create the headers directly through GUI.
right click the data grid. go to properties.
go to the last part which is misc-columns.
click on it. a new dialog will open. u add all the headers here.
so that even if the records retrieved are empty,
the headers will be displayed.
please get back to me if needed.
Keshav Kamat
India
|
|
|
|
|
in that case, please dont have headers stored in the columns of the database.
just have the headers as the column names.
Keshav Kamat
India
|
|
|
|
|
I can 't find the misc-columns you are saying. What I have is property called "Collection" and from there you can define the header. that is what I did.
Please expound mor ein detailed.
Dabsukol
|
|
|
|
|
Hi,
I have a function named func1() and dropdown1_SelectedIndexChanged(object sender, System.EventArgs e) event
Now in this function after few steps i want this event to be raised!!!
How can this be achieved?
Gautham
|
|
|
|
|
Hello,
Raising the event can only be done by the dropdown control itselve.
So you can change the "SelectedIndex" property of your dropdown instance, from the "func1" method.
If you just whant to run threw the "dropdown1_SelectedIndexChanged" methods code, I would make a third method which is called from both methods.
All the best,
Martin
|
|
|
|
|
Martin,
How can i change the "selectedindex" property of the ddl in func1()??
so far i have tried this:
func1()
{
........
........
........
dropdown1.selectedvalue="1";
}
however this does not call the dropdown1_selectedindexchanged(object,...) event.
Without writing a third method is there any other way?
Thanks!
Gautham
|
|
|
|
|
Gautham
You can do that by making Dropdown autoPostBack false and add one button on aspx page
After selecting item from dropdown click the button
add this in button click
and do what you want to do
Button1.Click += new EventHandler(Views_SelectedIndexChanged);
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
A friend of mine is trying to *CREATE AND PUBLISH* a street map for his Non-US City (Google, Mapquest or Yahoomaps do not have any *STREET LEVEL* information regarding that city). I would like to know if any of you are familiar with a software that can be used to create street maps like Maspquest and or Google.
The tricky part is to make this map searchable by address (like google maps or mapquest etc.)
Perheps a plugin for maps.live.com where we can create the map and let Microsoft publish it on their website or Google or some one else.
Please direct us in the right direction as to where we need to start this work. Thanks.
P.S. Just curious to know what technology does Mapquest and Google use for their street maps?
|
|
|
|
|
Hi!
actually i added my tree view on scroll and i want that when nodes of tree are expanded and tree view's size becomes greater than panel's size then automatically scroll bars should be applied on it.
I have done it by writing "overflow:scroll" in style property of panel.Now when size exceeds auto scroll bars become visible and work goes fine but one problem is that two vertical scroll bars are visible i think one of panel and other of tree view but i have not set scroll bar on tree view and second problem is that when i click plus sign of tree view placed in panel it is expanded and act normally uptil no scroll bars are applied but as soon as scroll is aplied and whenever i move scroll down and then i click on plus,node is not expanded.Hope u understand what i mean to say, i mean uptil my panel is in default position my tree placed on it is working fine but when scrolls are applied and i move my scroll down and then after clicking on tree node it doesnot act normally,may be it is refreshed again and something else i cant understand.
and i m making application in C# asp.net web application.
Thanx
|
|
|
|
|
Hi,
I have a value returning from a database and that value is of datetime format dd/mm/yyy.
Now iam trying to convert the value to datetime so that it can be assigned to a datetime variable, however it displays an error stating the input string is incorrect format as it recognizes only mm/dd/yyyy format.
my code = convert.todatetime(objdr["startdate"])
Gautham
|
|
|
|
|
Try
my code = convert.todatetime(objdr["startdate"].ToString())
|
|
|
|
|
NAVNEETH,
that isnt the solution!!! when we use covert and datetime the sys will try to convert in mm/dd/yyyy format so if my returned date from database is in dd/mm/yyyy then it will throw an exception
dates which will throw error are: 13/03/2007, 22/01/1987, et etc
Gautham
|
|
|
|
|
gauthee wrote: I have a value returning from a database and that value is of datetime format dd/mm/yyy.
No, you don't. A datetime value doesn't have a format at all. Either you have a datetime value, or you have a string that represents a datetime value. As you are getting an error converting it to a datetime value, it has to be the later.
If possible, you should convert the data type in the database so that you are storing the datetime values as datetime values, not as strings.
Otherwise you have to specify the format when you are parsing the strings that you get from the database:
DateTime somewhereInTime = DateTime.ParseExact((string)objdr["startdate"], "dd/MM/yyyy", CultureInfo.InvariantCulture);
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Hi
This will convert into format mm/dd/yyyy. But I dont have idea about convert this back to dd/mm/yyyy.
string StrDate = "13/03/2007";
DateTime dtmConvertDate;
IFormatProvider format = new CultureInfo("en-GB");
dtmConvertDate = DateTime.Parse(StrDate.ToString(), format, DateTimeStyles.None);
Response.Write("Date Format:" + dtmConvertDate.ToShortDateString());
Harini
|
|
|
|
|
Hey Gautham,
here is a simple way.
declare these variables first. just copy paste them.
string LocalTime = null;
DateTime dt;
DateTime local;
string localDateTime = null;
now, take the value from the database, and put the value in the variable LocalTime.
LocalTime = value(s) from the database ... should be a string value.
dt = Convert.ToDateTime(LocalTime);
local = dt.ToLocalTime();
localDateTime = string.Format("{0}/{1}/{2}", local.Month, local.Day, local.Year);
"put values in database" = localDateTime;
I hope its easy. get back to me if u dont understand
Keshav Kamat
India
|
|
|
|
|
Hello All,
i am using the following sql syntax in a sql command to drop a table if it exists.
DROP TABLE IF EXISTS TABLENAME
It should work fine in sql, but when i use this in a sql command, through C#, it gives me an error, saying there is a syntax error before IF.
could anyone help me? thanks in advance.
Keshav Kamat
India
|
|
|
|
|
I am not sure that we ca execute PL/SQL commands using commands object
|
|
|
|
|
we'll we can execute that command in a version of oracle in which i have worked before. Almost all the websites I checked give me the same query to check and accordingly delete the tables.
I have checked though that we cant use the if word in C#, for some reason.
I just want a way to drop tables if they exist directly through C# code.
i know how to create and drop, but to check and drop doesnt work out atleast for now
Keshav Kamat
India
|
|
|
|
|
I want to implement a dialog like the above examples when using MSDev. The dialog is docked in the left side of the application window and when hovered on top of shows the entire dialog, otherwise it's minimized. Any idea?
(Extra info: in this dialog I plan to implement a drop-down listbox and depending on which item in the list box is selected, a child window shows. (So yea the main app is a MDI and this MDI app is where this toolbar-type dialog will be docked).
Thanks in advance!
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
Hi All! I'm working on a windows service which polls a mailbox and retrieves mails through POP. Then it processes mails it retrieved from the server. Sometimes server stops responding in between the processing. I want to know how to gracefully stop the service and restart it. I've not worked with windows services prior to this, So I don't have much idea about it. Any help would be very much appreciated.
Thanks!
Don't Quit
|
|
|
|
|
TextFormat class allows you to justify a text to left, right, top, bottom, center and middle of the clip rect. But I saw in Microsoft Word an option to justify text to both margin, so every line of text has the same width.
I checked the TextFormat properties and didn't find out how to do this.
Please help me, thanks alot.
|
|
|
|