DataGridView and sync other controls


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Randy,

I am glad that you found your issue.  As we would have directed you to look at any other events that could be getting trapped since it should be working.  Also, that is the perfect solution for your line breaks.  Good job Smile

Randy Jean
Randy Jean
StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
I finally gave up and created a new form with same bo and bindingsource. Created the textbox as a non-strataframe control as the sample showed (tried this on the old form but still could notget it to work) - now it works great! Not sure why I couldn't get the other form to work.



I also figured out the CrLf issue - I just created a custom readonly-property on the bo which returns Me.RawData.Replace(vbCR,vbCRLF)



Now I just need to pretty it up. I figured it had to be easier. What started this is another programmer here had logic to requery the backend in the click of the grid just to get the raw data from the same record which was already in the underlying data layer from the form load!




Randy Jean
Randy Jean
StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
I just verified the businessbindingsource sample works as expected and doesn't look like there's any special code to hook it up to the navigation - I think I just need to delve deeper into comparing what might be different. I'll let you know what I find (I'm in a .NET class all week so just revisiting this as time permits)
Ralph Rutschmann
Ralph Rutschmann
StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hello Randy,

I do the following to syncronize a few textboxes (on a tabpage, bound to BO boOmnibus) with a datagridview:

private void dataGridViewOmnibus_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //Synchronizing the tabPageDetails with the dataGridViewOmnibus
            boOmnibus.Navigate(MicroFour.StrataFrame.Business.BusinessNavigationDirection.Absolute, this.dataGridViewOmnibus.CurrentRow.Index);
        }

HTH, Ralph

Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

One possible cause is that is broken rule on row.
Randy Jean
Randy Jean
StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)StrataFrame User (167 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
Excuse me for being so dense, but I'm trying to create a simple form, 1 business object, businessbindingsource, datagridview and a multiline textbox for displaying text from the same bo that my datagridview is bound to. I populate my BO in the load of the form. Text in my corresponding textbox shows from first row, but when I "navigate" through my grid, textbox is not updated with data and I can't see evidence that the currentrowindex is even changing on the BO.



I've looked at the sample for businessbindingsource (can't run it now because I don't have access to the strataframe sample database offline and don't know how to get it without installing, which I don't want to do because I have copied newer dlls) - anyway, I set a breakpoint in my businessobject navigated method and also try updating a label to show the currentrowindex - it never fires as I move through my grid. For the life of me I can't seem to figure out how to simply refresh other controls bound to the same BO that my datagridview/businessbindingsource is bound to. I don't have a toolstrip or anything like that. I can't believe how many hours I've spent on this. Any help would be appreciated. Everything I'm reading/looking at makes it seem like this should just work the way I have it.









One more thing... Anybody know how to get my textbox to wrap on the carriage return (without line feed) and not show the little square box (which is the carriage return) without having to add line feeds?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search