Pgmer 50 Master Poster Featured Poster

Cant you have contact person and company combobox on same page?
if yes then you can validate easily user has selected the company for contact person or not

Pgmer 50 Master Poster Featured Poster

Load the questions to dataset and on click event loop through the dataset to get next questions and assign that to list box

Pgmer 50 Master Poster Featured Poster

Go to the design mode of form to which u want to add tree view
In common controls tab u will find the treeview control just drag and add to the form

Pgmer 50 Master Poster Featured Poster

How you are loading the textbox now? are you getting the data from db to dataset?

Pgmer 50 Master Poster Featured Poster

Select Question from Questions table where year=@year
fill the dataset with Questions and Show only record. u can use the Index property of grid and then on clik event of button get the row of next index hide other rows

Pgmer 50 Master Poster Featured Poster

Please mark thread as solved if it is solved.

Pgmer 50 Master Poster Featured Poster
If CheckBox1.CheckState = CheckState.Checked Then
               If CheckBox1.CheckState = CheckState.Checked Then
                For i As Int16 = 1 To 5
                    ListBox1.Items.Add(i).ToString()
                Next
            Else
                ListBox1.Items.Clear()
            End If            End If

Write this code in CheckBox1_CheckStateChanged Event

Pgmer 50 Master Poster Featured Poster

Hi,
Are you using datagrid? or any other 3rd party grid?
What is the problem at client side?

Pgmer 50 Master Poster Featured Poster

Great...:)
sometimes we miss copylocal=true for some dlls :)

Pgmer 50 Master Poster Featured Poster

Yes @@identity will give you the the New id after insert

Pgmer 50 Master Poster Featured Poster

Coz ur having column of type money in DB and from front end your sending the decimal, try creating temtables and move the data and changecolumn type and import ur data from temp table

Pgmer 50 Master Poster Featured Poster

In db also Make the column salray as decimal and try

Pgmer 50 Master Poster Featured Poster

Try Back color property and borderstyle property of label.
And for textbox i dont think we can do that...

Pgmer 50 Master Poster Featured Poster

try to increase the command.timeout

Pgmer 50 Master Poster Featured Poster

The 3rd pc has been installed with the frame work?

Pgmer 50 Master Poster Featured Poster
IIf(Isdubnull(Last),0,Last)

Hope it works :)

Pgmer 50 Master Poster Featured Poster

Get all the selected rows in loop
declare new row and datatable , Add the selected row to datatable and then assign this datatable to data set and bind the dataset to GRIDVIEW

Pgmer 50 Master Poster Featured Poster

Hi
you need Single selection or multiple selection?
If you want to have multiple selection of rows have you provided any checkbox in Grid view column?

Pgmer 50 Master Poster Featured Poster

In which line your getting the error message?

Pgmer 50 Master Poster Featured Poster

Hi all,

Any one know the root cause for this and sollution?

Thanks

Pgmer 50 Master Poster Featured Poster
Dim str as string
str=textbox.text
str=str.substring(0,2)
str will hold the value of first two charecters
Pgmer 50 Master Poster Featured Poster

Use IIf(IsDBNull(urobject), "", Data ur fetching
IIf(Isdubnull(Object tocheck for null),True part,Falsepart)

Hope it helps u

Pgmer 50 Master Poster Featured Poster

Thanks for your response.
This may going to be work arround for the problem.
i want to know is this bug is in checked list box? or I am doing something wrong?

Pgmer 50 Master Poster Featured Poster

Hi All,
I have checkedlistbox on my windows form which is binded to datasource,
I do check the items in checkedlistbox based on some criteria,
When user uncheck some items I want to save the records, but in Checked Items collection still I’m getting items as checked, which are unchecked. checkedlistbox still remembers the previous checked items

Pgmer 50 Master Poster Featured Poster

Hi thanks for you reply.

i found the solution for that. here is the code.

<asp:ListBox ID="lstbox" runat="server" SelectionMode="Multiple" 
               AutoPostBack="true" CausesValidation="true" OnSelectedIndexChanged="lstbox_SelectedIndexChanged1"  >
             <asp:ListItem Text="one" Value="1"></asp:ListItem>
       <asp:ListItem Text="two" Value="2"></asp:ListItem>
       <asp:ListItem Text="three" Value="3"></asp:ListItem>
       <asp:ListItem Text="Four" Value="4"></asp:ListItem>
       <asp:ListItem Text="Five" Value="5"></asp:ListItem>
       </asp:ListBox>
        <asp:CustomValidator ID="CustomValidator1" runat="server" Display="Dynamic" ErrorMessage="Please select 3 items only."
         OnServerValidate="CustomValidator1_ServerValidate" >
        </asp:CustomValidator>

Code behind:

protected void CustomValidator1_ServerValidate(object sender, ServerValidateEventArgs args)
    {
        int count = 0;

        for (int i = 0; i < lstbox.Items.Count; i++)
        {

            if (lstbox.Items[i].Selected)

                count++;

        }
        if (count <= 2)
        {
            args.IsValid = true;
        }
        else
            args.IsValid = false;
            

    }

  
   
    protected void lstbox_SelectedIndexChanged1(object sender, EventArgs e)
    {
        int count = 0;
        int i = 0;
        System.Web.UI.WebControls.ListBox sen = default(System.Web.UI.WebControls.ListBox);
        sen = (System.Web.UI.WebControls.ListBox)sender;
        for (i = 0; i <= lstbox.Items.Count - 1; i++)
        {
            if (lstbox.Items[i].Selected == true)
            {
                count = count + 1;
            }
        }
        if (count > 3)
        {
            lstbox.Items[sen.SelectedIndex].Selected = false;
        }
    }
Pgmer 50 Master Poster Featured Poster

Thanks for ur reply.

i think the above code will not help.
i need to prevent user from not selecting more than 5 items.

Pgmer 50 Master Poster Featured Poster

Hi Guys I'm New to web development.

i need one help. I'm having list box on my form, in form load event i will bind the list box with database value. user should be able to select only 5 items from the list box and also i want to validate onsubmit button click weather user is selected 5 items or not . if not give alert. client side java-script i need to use? sample code will help.

Tanks.

Pgmer 50 Master Poster Featured Poster

if u want to give the setup u have to publish the application. its same in both 2005 and 2008.

what u mean by single exe?
if supporting files and the dll used in ur application are not included in the exe then do u think that exe works?

Pgmer 50 Master Poster Featured Poster

to add
combobox.items.add("xyz")
combobox.items.add("abc")

to retrieve u can use
combobox.selecteditem or combobox.selectedindex

Pgmer 50 Master Poster Featured Poster

I got it guys.

Pgmer 50 Master Poster Featured Poster

i dont think it works....
whats the logic behind it
?

Pgmer 50 Master Poster Featured Poster

That button should be publicaly decalred.
if it is publically availabele then
in child form closing event

Mdiform.cmdmenu.disabled=true
Pgmer 50 Master Poster Featured Poster

Hi all,
i need to select the paragrah from the current cursor position.
any ideas?

Pgmer 50 Master Poster Featured Poster

This requirement seems a bit expensive as far as processing goes. What kind of application are you creating that needs this. Maybe there is another way to handle it.

Its kind of word processor application.
any idea to achive this ?

Pgmer 50 Master Poster Featured Poster

Hi All
I need to capitalize the first word of each new sentence as user types. How will i come to know about the start of new sentences?
do i need to use regular expression for this?

Pgmer 50 Master Poster Featured Poster

Yes it wil work
just copy and paste the code and run..
if not works plz let me know.

Pgmer 50 Master Poster Featured Poster

Thanks.
I got the solution

Pgmer 50 Master Poster Featured Poster

Hi all i need one help.
i have a text file something like this
date time employee name Department id Employee id
Jan 2007 12 pm abc 001 676666
''''' '''''''''
'''''' '''''''''' ''''''''''''' '''''''''''''
'''''' '''''''''' '''''''''' ''''''''''
Feb 2007 9am xyz 005 434367

all are tab delimited and now i read this file and need to get the details.
any idea?

thnks

Pgmer 50 Master Poster Featured Poster

yes Ur correct application.startuppath will give you the path where Ur executable files are there in the machine.
Application.StartupPath + " the desired path u want to be"

Pgmer 50 Master Poster Featured Poster

what u mean by graphically here?

u can resize the control at run time using controls property called size
and also u can change its location using location property.

Pgmer 50 Master Poster Featured Poster

In vb.net u need to use the property called Application.StartupPath="path u want to give"

Pgmer 50 Master Poster Featured Poster

In windows application if u want to create user control
develop the application go to properties of the project make it as a class library
and then select start up object as nothing then run the application
it will give u the dll file instead of .exe
you can use this dll as component as user control wherever u want

Pgmer 50 Master Poster Featured Poster

Hi all.
Thanks for ur response... Finally i got the solution for it....


thnks again.

Pgmer 50 Master Poster Featured Poster

if u just want to open MS Word u can use
system.diagnostic.process.start("winword") no need to give path..
if u want to run in other machine also it works only thing is that machine must have msword installed.

Pgmer 50 Master Poster Featured Poster

Ya i tried doing this the problem is,
if user enters the blank lines by pressing enter key it counts as paragraph only.
so any other solutions?

Pgmer 50 Master Poster Featured Poster

Exactly what u want to do? do u want to automate msowrd?

Pgmer 50 Master Poster Featured Poster

You have to add com object reference in your appliction
i.e microsoft word 9.0 object library and in namspace
iimports the word so that you can use the ms word object in ur code as you like
just try it out.

Pgmer 50 Master Poster Featured Poster

Thanks for ur response
i got the solution for It. but only thing is i need to count the number of paragraphs in the document. any bady knows how to count the number of paragraphs in the document?

Pgmer 50 Master Poster Featured Poster

Hi all
im Implementing wordcount feature in my appliction it counts the numberof lines in the document,number of pages, number of charecters with space and without space,
numberof paragraphs in the document

i implemented this function it is working fine but the problem is becoz of loops and im checking each charecter, so if the document is too long say 30 or more pages my apliction get hangs.
so any bady is having the idea to implement it another way?
any advice is welcome
thnks...

Pgmer 50 Master Poster Featured Poster

Hi laghaterohan
sory for late reply.
yes it works for all u need to have outlook istalled iin ur machine
basically im checking for the windows registry key, that method vill give u the default mail client once u get it vill open the outlook and attach the file.