|
hey u can use the currency manager ..it keeps the grid enabled but stops adding new rows in the grid...probably the best option for u ....here is the code...to do that...
Dim cm As CurrencyManager
cm = CType(Me.BindingContext(dgAddInv.DataSource, dgAddInv.DataMember), CurrencyManager)
CType(cm.List, DataView).AllowNew = False
it worked for me .........
" There are 10 types of people one who understands binary and one who don't................."
|
|
|
|
|
Thx for ur help. I tried ur code, it did not work with me. It forbids me to add a now row in the datagridview at runtime. I need it to allow me add rows at runtime but if i clicked on a new row and did not enter values in it, i want it not to insert it in the database. Help!
It did not work.
|
|
|
|
|
hey well then we have a work around that u can try......once user adds a blank row and clicks on save with nulls in that row ....delete that row from datatable as follows...
lets say actual datatable name is dataTable
and the temp one we are creating for manipulating is temptable
temptable = dataTable
For dtblnkrowcnt = 0 To dataTable.Rows.Count - 1
For colcount = 0 To dataTable.Columns.Count - 2
'u can check for blank or system.dbnull.value as suitable.....
If dataTable.Rows(dtblnkrowcnt).Item(colcount) = "" Then
blankcount = blankcount + 1
End If
Next
If blankcount = dataTable.Columns.Count - 1 Then
temptable.Rows(dtblnkrowcnt).Delete()
End If
blankcount = 0
Next
temptable.AcceptChanges()
dataTable = temptable
i know its just a workaround but it should fix up the issue ....best of luck dude.....
" There are 10 types of people one who understands binary and one who don't................."
|
|
|
|
|
I am inserting values in a datagridview bounded to a dataset. It working normally. If i click on an empty row on the datagriview and did not enter a value, when i try to insert in the database, it is inserting a null value in the database although it is not present in the dataset.
|
|
|
|
|
DataGrid1.Enabled = False
that is worked
Ahmed El-Badry
|
|
|
|
|
Thx for ur help . But i tried it before and it did not work. I need to keep the datagridview enabled to add rows at run time but i do not want it to add null rows.
Thx but it did not work.
|
|
|
|
|
i have a form and i set transparency key on orange color, and my form background is orange same color and i placed png image that have shadows and other but it doesnd transparent it fully becose of shadows... is it possible to set it fully transparent? or i need to remove shadows?
thanks
sorry on bad english
|
|
|
|
|
If you want to transparent an image with transparencykey, dont set the form backcolor to same as the transparencykey, because only the form will be transparent. And also check whether the image color you want to transparent same as the transparencykey.
Sorry on bad english too.
Experience is the best teacher
|
|
|
|
|
|
i want to create a batch file that compiles the project and generates the dll for the same (vb and vb.net projects)....scratchin my head since morning ...need help ...
there are 10 types of people one who understands binary and one who don't
|
|
|
|
|
if you want run some command type thes code
Shell(your command)
Shell("Ping 10.0.0.1")
if you want to hid action type
Shell("ping 10.0.0.1", AppWinStyle.Hide)
Ahmed El-Badry
|
|
|
|
|
okies ...well yes that is if i want to run my commands directly from the code...
rght ...well i was waiting ...for the reply i figured out myself what i was looking for ..
we can create a batch file ...with foll code
cd C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
cls
devenv /build Debug "C:\Documents and Settings\atul.sharma\My Documents\Visual Studio Projects\YMSEntity\ymsentity.sln"
devenv /build Debug "C:\Documents and Settings\atul.sharma\My Documents\Visual Studio Projects\ClassLibrary2\classlibrary2.sln"
This way i can build the dlls of multiple projects in a single go .....thanx buddy for ur time and thought...
" There are 10 types of people one who understands binary and one who don't................."
|
|
|
|
|
I did the file watcher that catches deletes,renames,new files but:
Is it possible that you watch if someone moves files or even if i place a "D:" disk to watch than if someone ower network access that drive on my computer that it pop up message?
Please if you can help me on any way please help me...
|
|
|
|
|
Hello,
I am Using VS.net 2005. in this i was create custom textbox control for when textbox got fosus then textbox's font will be bold and green colour. that is working.
but now problem is this. i am unable to input data into textbox from database. because it is not working as a textbox. and not get textbox property as we want to set password char.
Please help me.
may be control is not created right method.
if anybody know to create coustom textbox for when textbox got fosus then textbox's font will be bold and green colour. plese tell me.
Thank You.
Vikash Yadav
|
|
|
|
|
How have you done this ? Have you derived a class from the TextBox ? If so, it IS a textbox. If not, why not ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thank You For Help.
But i want to tell you i am fresher. i dont't know that how i can create derived class from the textbox. can u help me. Pleaze send code if you have to create custon control textbox.in that i can change font size and colour.
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
Vikash Yadav wrote: i dont't know that how i can create derived class from the textbox.
OK, then stop writing GUI code and work through a book on the absolute basics.
Vikash Yadav wrote: Pleaze send code if you have to create custon control textbox.
I haven't. But, it's pretty simple. A lot simpler than what it sounds like you've done. Just create a class, make the TextBox the base class, and change the text color based on if you have the focus or not.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Tanks for a lot of help
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
well,
in my winform i have some datagrids and one these must have no scrollbars, i've to remove the scrollbars that automatically apeears...
how can i do this????
here the code
Dim hhh As Integer
For hhh = 0 To DataGridX.Controls.Count - 1
If DataGridX.Controls(hhh).GetType Is GetType(VScrollBar) Then
DataGridX.Controls(hhh).Visible = False
DataGridX.Controls(hhh).Width = 0
End If
If DataGridX.Controls(hhh).GetType Is GetType(HScrollBar) Then
DataGridX.Controls(hhh).Visible = False
DataGridX.Controls(hhh).Width = 0
End If
Next
where is my error????
thenk's a lot
|
|
|
|
|
i have a project in which i have added references to excel,system.web and vbide.
the project works fine,but when i copy the exe to desktop and run it from there,it does not work..it gives file not found exception..
y does this happen?
-- modified at 2:43 Wednesday 24th January, 2007
p.s.:this is the exact error i get:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in EM_MACSCAN.exe
Additional information: File or assembly name Interop.VBIDE, or one of its dependencies, was not found.
ik pair past mein,te dooja pair future mein.tabhi to aaj pe moot rahe hain.
|
|
|
|
|
never mind..i figured it out
ik pair past mein,te dooja pair future mein.tabhi to aaj pe moot rahe hain.
|
|
|
|
|
how to code a scrolling marque? using vb.net2005...
web links.. is also higly appreciated thank you...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Write your own control. Derive it from label. Use a timer, and every time it fires, increment the index of the first character you paint.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
I have two forms as form1 and form2.
I want to call form2 from form1 multiple time with different arguments. My question is if i supposed to call the form1 with already given argument, it should not open up as new form, it should activate the old form itself.
to be clear, form1 click to open form2 with arg value 1, and another click open form2 with arg value 2. now if i click form2 with argument value 1, then it should active the already opened form2 with argument value 1, not to open as new one.
Any help.
Regards
Rams.
Be simple and Be sample.
|
|
|
|
|
Hold the each form in collection with argument value and indentity.
when your open new form first u check in collection if exist then activate otherwiese create new form instance and show it with new argument.
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|