Telerik Radgrid - creating row in bindingsource

Posted by gdb390 on 28-Aug-2015 08:46

OpenEdge 11.5 

Telerik Winforms 2015.2.623.40 

Hi,

I have a form with a Telerik Radgrid bound to a bindingsource bsCustomer.

I have subscribed to the createrow event of the bindingsource

method private void bsCustomer_CreateRow( input sender as System.Object, input args as Progress.Data.CreateRowEventArgs ):
		
		
		if CreateCustomerRow() then args:Created = true.
		                       else args:Created = false.
		
		return.

	end method.


Debugging learned me that this method is published after entering the data in the row of the grid and after pushing Enter.

I have the same in Infragistics and there the event is published when entering the row, so that all initial values are displayed .

Anyone aware of this difference in handling the createrow event of the bindingsource ?

All Replies

Posted by Laura Stern on 28-Aug-2015 14:39

It is totally up to the control when it calls the BindingSource to add a new row.  The BindingSource is just sending this event in response to what the control has done.  So clearly you would need to code things a litlle differently on the ABL side depending on the circumstance.  But you're right that if it happens later you have lost the opportunity to have the initial values displayed.  I don't remember seeing that happen myself, but I can't commit myself to that statement at the moment.  Maybe there is a RadGrid property that will alter this?   Sorry I don't know.  But I can probably find out next week.  

Posted by gdb390 on 31-Aug-2015 04:09

Hey Laura,  there is indeed a property (one of so many ) that enables the createrow event on the bindingsource when entering the row.  

radGridView1:MasterTemplate:AddNewBoundRowBeforeEdit = true. 


Thanks for the hint ! 

Posted by Laura Stern on 31-Aug-2015 08:13

Great.  Glad (and amazing) that you found it!

This thread is closed