|
Yes I read your article on search. Actually after an exhaustive search I dare to put my question on the message board.
Please allow me to explain the scenario in which I required it.
SCENARIO:
Currently I am copying the bindingstrip and its coding from the employee form to any other form which I needed. It is working just fine. but it is a sort of duplication of stripbuttons event coding which is being copied on every form.
All the stuff such as creating dataadapters, fill dataset, create bindingsource, form control binding, tab setting, control max lentgth, selectcommand, insertcommand, updatecommand and deletecommand are all automated. It is all based on the Table Schmea. All the database related fields are binded with the same name controls on the form. For example, if I have OrderID, OrderDate, EmployeeID in the data table and I also have textbox control on the form as OrderID, OrderDate and EmployeeID. I simply used for each loop on data table columns and find the matching name control on the form to bind it. If it is not found it means it is a readonly control on the form. If it table field name is matches with the control name on the form. I tag it as a bindable control. Now, I set control maxlength property by using table schema. I also used for each loop to create CRUD statement automatically.
I simply build classes for them and I passed necessary info to my class to get required objects to run the form. These functions and procedures are all based on form type (Master Form, Master/Detail Form or Master/Detail/Detail Form).
Actually, I do not want to expose bindingnavigator button events coding in each and every form. Because It is same on every form.
I hope that now I might be able to explain the scenario in which I wanted to used one single common bindingnvaigator.
Thanks & Regards,
Sabahat
|
|
|
|
|
I'm assuming you allow the users to page through the records, much like Access. I don't allow this, I will display a list allowing the user to open the detail form as a dialog. Therefore I'm only binding to 1 record or a datagrid/listview.
I also use a table centric design, except my table class does all the crud via a DAL class. My table classes are auto generated using a tool I started building in 1996 and still fiddle with the bloody thing, it generates all the standard CRUD methods based on stored procs. A form often uses multiple tables.
So I think we are looking at different designs acheiving the same solution.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
User has choice to fill data via a stripcombo box where 10,50,100, nth record (No of records) options are available. Initially no records are filled. User can also use another stripbutton which has the functionality of (Query by Form) where user can enter values in any form control and press Fetch button to fetch the records. For example if user enter 100 in OrderID control and press fetch button. Only one logical record (Master/Detail) will be fetched from the database. These buttons are part of my bindingnavigator strip.
From a developer point of view. Now developer can simply drag a form control from toolbox and set its name as the data table field name. Thats all, no need to regenerate anything. At run time every thing will be liked with each other. It is also important to note that I am using un-typed dataset.
So my bindingnavigator strip is filled with necessary buttons, comb box, split buttons, export to Excel button, Print DataGrid button. That is why I wanted a standard bindingstrip.
I wonder if I can I make a user control from this bindingnavigator!
Thanks and Regards,
Sabahat
|
|
|
|
|
Does any one have any idea on how to export data from database to ms word 2007 without using a dataset or sql server reports?
|
|
|
|
|
You can control Word remotely to create documents, but if you create an rtf, or even a text file, Word will read it, right ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Guys!! I just want to find out that is it possible to write an application that checks free disk space on Linux server and store the info in the table. iF yes, Please advice how. I have tried google I can't find any solution.
|
|
|
|
|
Hey - we have a Linux forum now why don't you try there?
[Edit] Or do you mean query a Linux server from VB.NET? [/Edit]
|
|
|
|
|
I didn't post to the linux forum cos , I need to write a .net application that does that. Surely the guys within the linux forum wouldn't know VB.net.
|
|
|
|
|
I remember doing something similar to this a while back using *cough* Delphi *cough*.
It wasnt a nice tidy API call availiable. What I did was:
Create a telnet session
Send the command "df -k"
Read the results
Close the telnet session
Horrible hey?
However, if your linux box has samba installed, you can probably use standard API calls, depending on how it is setup.
A final possible (and also nasty ) method would be to set up a cron job on the linux box that ran
"df -k >>output.txt"
And if "output.txt" is in a directory which can be FTPd to, you can use FTP to get the results, and parse this file.
But I would suggest trying the Samba route - its much cleaner!
|
|
|
|
|
hi,
I am moving a label based on a timer's tick event.
Now the problem is when label repaints (after i move its location), its not moving smoothly as it should be.
Am I missing some property or something.
Help me out.
|
|
|
|
|
SetStyle is a method on your form, there's a couple of styles you set to fully turn on double buffering.
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
its still sticking.
i have a usercontrol which is moving my label (inside usercontrol) and i have call these methods (setstyle) in both cases (on form and on usercontrol), but still having same problem.
i have also set DoubledBuffered to true.
the usercontrol is like our news ticker.
and one important thing, the timer's interval is between 15 to 25 and i am moving label of 3 pixel.
|
|
|
|
|
Dear All!
I am looking a code for multi level adding treeview using Vb.NET for Winforms.... i am not sure my approach is good or not, but i am stuck on 2nd level..... what shall i do i don't know any body can help me my project is pending due to this.. on next stage we we disscuss drag and drop..... some code not there for more understanding...
My Data Looks like.....
ID Name PID LEVEL
1 Root1 1 0
2 Root2 2 0
101 Root 1 Child 1 1 1
102 Root 1 Child 2 1 1
201 Root 2 Child 1 2 1
10101 Root 1 Child 1 Child 1 101 2
10102 Root 1 Child 1 Child 2 101 2
Dim DT As New DataTable("HRV")
Dim DC As DataColumn
Sub MakeTable()
Sub Data()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MakeTable()
Data()
Me.DataGridView1.DataSource = DT
PopulateTreeView()
End Sub
Sub PopulateTreeView()
For Each row As DataRow In DT.Rows
Select Case row("level")
Case 0
TreeView1.Nodes.Add(row("PID"), row("Name"))
Case 1
Dim FD() As TreeNode
Dim k As String
k = row("PID")
FD = TreeView1.Nodes.Find(k, True)
TreeView1.Nodes(FD(0).Name).Nodes.Add(row("PID"), row("Name"))
Case 2
End Select
Next
End Sub
|
|
|
|
|
I think you just need to order your data source on level, and just create the nodes within a loop - no need for a case statement. Level 0 will not have a parent, otherwise, PID should be the parent node.
HTH
|
|
|
|
|
Thanks for your reply can you Please help me in code... really my mind is not working... i have too much pressure ....
|
|
|
|
|
You already have the code in the sample you posted - to create nodes with / without a parent... try and use that?
|
|
|
|
|
if i remove the level coding it will give me the error.? how can i send you the sample application which i am working so you can check that...
there is some thing missing i don't know what...but there is some thing....
|
|
|
|
|
Hi Dear!
little bit upate code as you said to me, but problem is? 2nd level tree nodes how they will come.. this coding adding only level1.........again stuck
Sub PopulateTreeView()
On Error Resume Next
For Each row As DataRow In DT.Rows
Dim FD1() As TreeNode
Dim k1 As String
If row("ID") = row("PID") Then
TreeView1.Nodes.Add(row("PID"), row("Name"))
Else
k1 = row("PID")
FD1 = TreeView1.Nodes.Find(k1, True)
TreeView1.Nodes(FD1(0).Name).Nodes.Add(row("PID"), row("Name"))
End If
End Sub
|
|
|
|
|
Hi i had 3 windows forms.
one is main form.
on clicking on button 2nd one pop ups.
on clicking button is=n 2nd 3rd window(final window need) pops up. now all windows except final window hides.
my problem is i cannot get fiocus on final window. y so?
i tried in all angles like : bring to front, focus,acti9vate etc.... no way
any other way to make final window get focus?
|
|
|
|
|
You can try Solution Explorer for access the form.
Secondly may be your form.resx file contants are missing or deleted.
If you are saying about Forms Group Box then you can select the Object from Property window and set it's property for visible and location and Size also.
if any other query pls contact.
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
9250168195
|
|
|
|
|
Is there an easy way to get the infomtion from a DataGrid and dump it into MS Excel using VB6?
|
|
|
|
|
|
I am using VB6 - the datagrid I want to export to Excel is about 5000 records 20 colums wide.
Is there a way to dump the entire datagrid at once or does one need to read each record/cell and transfer it to Excel?
|
|
|
|
|
You can export the data from Datagrid to MSEXCEL.
How can it possible pls contact ?
Cheers
Anubhava Dimri
anubhava.prodata@gmail.com
9250168195
|
|
|
|
|
Hi there.
I'd like to know, can we use XNA or DIRECTX in VB.NET like C#.NET ?
Thanks in advance .
Sorry for my English. I'm a freshman .
|
|
|
|