
shireenrao
Avatar/Signature-
Posts
31 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by shireenrao
-
Hi Does anybody know how to intercept the Tab key, while entering data in a datagrid. I mainly want to prevent the row to change using the tab key. Thank you Srinivas
-
Attached Gif Sorry about that... did not attach the first time. Shireen
-
Hi I have been getting this really wierd error. When I change tabs from my Code view to my Design view for a form in my IDE, I get this wierd error. The error message is attached as a gif. Can anybody throw some light on it? Thanks in Advance Shireen
-
I am sorry about this, but this was not working because of my stored procedure. once I corrected the error, it was working. Shireen
-
Hello I have a DataGrid which is bound to a DataTable. I know that the way the DataTable works is, when I add a new row or do any changes to existing data, each Row's RowState changes. So depending on new RowState I fire different stored procuderes. For ctr = 0 To myTab.Rows.Count - 1 If myTab.Rows(ctr).RowState = DataRowState.Added Then 'fire insert stored procedure ElseIf myTab.Rows(ctr).RowState = DataRowState.Modified Then 'fire update stored procedure ElseIf myTab.Rows(ctr).RowState = DataRowState.Deleted Then 'fire delete stored procedure End If Next The problem is when I have deleted a row, and when I have looped the datatable to the point where I get to the row which is deleted, I try to access the row id(the first column of the row), so I can send that ID to the stored procedure. I try this by setting the value of the parameter by prm.value = myTab.Rows(ctr).Item(0) but I get an error saying this is not possible, as I am trying to get a deleted row. I even tried setting the DataRowVersion as original, but it still does not work. Anybody having any ideas please help.. Thanks Shireen
-
Hi This is how you do it - DataGrid.CurrentCell = New DataGridCell([rownum], [colnum]) Thanks Shireen
-
Hello I am trying to set focus on a blank cell in a grid. Wouldn't DataGrid([rowindex],[columnindex]).setfocus work?
-
I found my own solution... http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q756q Thanks
-
Hello I have a datagrid which is bound to a DataTable. I also have a BindingManagerBase, which is again bound to the same DataTable. I use the BindingManagerBase so I can navigate the grid using buttons. Now when I want to add a new record, I just have to call AddNew() to the binding manager base. Is there a way I can get the first column of the grid to give a autogenerated ID, and the cursor starts from the second column? right now, I get the cursor pointing to first column when I call AddNew(). Thank you Shireen
-
insert new record in oracle using datagrid
shireenrao replied to shireenrao's topic in Database / XML / Reporting
Thank you Jabe Do you know of the event to write the update in. I want to fire this event whenever there is a new record. Or should I have an explicit save button? Thank you Shireen -
Hello I have a datagrid on my form. Data is retrieved into the grid using a stored procedure from oracle. My stored procedure returns a cursor. I then fill a table in a dataset with this retrieved data from the cursor, and bind it with my datagrid. here is code - Dim Oraclecon As New OracleConnection("SERVER=some;USER ID=some;PASSWORD=some") Oraclecon.Open() myCMD = New OracleCommand() myCMD.Connection = Oraclecon myCMD.CommandText = "package.get_Test_vals" myCMD.CommandType = CommandType.StoredProcedure Dim prm As OracleParameter = New OracleParameter("testValues", OracleType.Cursor) prm.Direction = ParameterDirection.Output myCMD.Parameters.Add(prm) oda = New OracleDataAdapter() oda.SelectCommand = myCMD Dim ds As New DataSet() oda.Fill(ds, "loadvalTable") Dim myLoadValTable As DataTable = ds.Tables("loadvalTable") DataGrid1.DataSource = myLoadValTable bmbGrid1 = Me.BindingContext(myLoadValTable) where bmbGrid1 is a BindingManagerBase. I use bmbgrid to navigate the grid using buttons. e.g. first record, next record, previous record, last record. Now I want to insert a record into the grid. I can do that, but can't figure out a way to insert it into the database. If anybody can point me to the right direction, It will be great!! I am really desperate!! Thank you in advance Shireen
-
Never mind... I solved the problem. Earlier I was binding the BindingManagerBase with the datasource - where ds was my dataset. I just directly bind it to the datatable I create. where dt is the datatable
-
Hello I am trying to bind some buttons to a datagrid so I can use it to navigate the grid. Under normal conditions I create a BindingManagerBase(BMB) and bind it to the datasource. I then just change the position of (BMB). In my case, my grid has a modified datasource, so I can have the data more readable(modified header, and width). For this, I created a DataGridTableStyle, and then bound a new DataTable to the datasource. Then I go through each field in a row, and depending on the column, I modify the header and width by modifying the DataGridTextBoxColumn. Finally I clear the Grid's original table style and add the style I created. How can I navigate this grid. Thank you Srinivas
-
Hello I have a Datagrid, and to navigate it, I created a few buttons where I can directly go to frst record, last record, next record and previous record. The way I am doing this is given below. I have a bindingmanagerbase, which I am using to navigate the grid - and for the buttons I have Now I have a second grid which has a lot of data(13 columns). If I just use the datasource as it is, the grid data extends beyond the length of the grid, and you have to use a horizontal scroll bar. To avoid that I did some changes to the datasource. I create a DataGridTableStyle and map the table from the datasource. I then create a datatable for the same table from the datasource, and manipulate each column by changing its header, and width. The code is given below - I get the data to display in the grid. Now how can I get my navigation to work in such a case. As the source of this grid is a datatable, and all I want is a datasource. Sorry for such a long email. I dont think I would have been able to explain my problem with out giving an example Thank you in advance. Shireen
-
I did a lot of searching on google and came up with this site. This has exactly what I want. look at 5.5 http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp Thank you
-
Hello I was successful in getting a datagrid populated from a oracle database using a stored procedure. Now, I am trying to insert or modify the data in the grid to be inserted into the database. My Questions is - Can I have a drop down in a field of the grid? (the field in the grid is a foreign key to in the table, and I want to be able to choose one record from that table) Has anybody done anything like this before? Thanks in advance Srinivas
-
Thank you VolteFace As you mentioned, I just had to add the forms dll Thank you
-
Hello I was following an faq on this autocompletion of comboboxes from http://www.vbcity.com/forums/faq.asp?tid=29498 Now according to this, you can create a Visual Basic .NET Class Library Project and just create a new class which extends the combobox. Now when I create a new .NET Class, I am not able to import the System.Windows.Forms namespace. When I type - Imports System.Windows.Forms I get error "Namespace or type 'forms' for the Imports 'System.windows.forms' cannot be found." What may the problem. Thanks in advance Shireen
-
Oracle stored procedures problem
shireenrao replied to shireenrao's topic in Database / XML / Reporting
I figured out how to do this. The code is below - Let me know, if anybody needs an explaination. Hope this helps somebody Srinivas -
Hello I am trying to implement stored procedures with my vb.net application. In one part my stored procedure returns -1 if login fails. My code is - now from vb.net how should I invoke this procedure? I have some idea.... This is what I think I need to do.. Now how do I pass the parameters to myCommand, and how do I get the result? Thanks Srini
-
Hey Guys I figured it out.. As I was using my own constructor, I was not using the default, which was where all the components were getting initialized. I just add MyBase.New() and InitializeComponent() to my defined constructor and everything worked out fine. Srini
-
I started debugging my code, and found out that I am able to go upto frmform2.Show() I am getting the error message "Object reference not set to an instance of the object" during formLoad of frmfrom2, when I am trying to add a value to a combobox after a database lookup. The error message comes at ComboBox1.Items.Add(myReader("ID")). myReader("ID"), does exist, and I can see what it is. Why is this happening? Srini
-
This what I am doing, after changes suggested. Assume main mdi is frmMain, and child(dialog to main) is frmForm1, and the dialog to the child is frmForm2 I am invoking the child by - Dim frmform1 As New frmForm1() frmform1.ShowDialog() Now from the child I want to invoke another form - Dim frmform2 As New frmForm2(Me) frmform2.MdiParent = Me.ParentForm frmform2.Show() the constructor for frmForm2 is the way you had suggested. I get an error saying "Object reference not set to an instance of the object" Am I doing something wrong? Srini
-
Hello there I am building an application, where I start with an MDI. A child is opened through a menu. one of the buttons on this child then opens up Dialog form. I want to execute a function which is part of this dialog forms parent(child to the mdi) from the Dialog form. Can this be done. Thanks in advance Srini
-
Hi Please disregard my last post. I just had to do a ListView1.SelectedItems().Clear() To clear the selectedItems collection. Sorry about that