We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PostBackOnFocusedChanged seems not working

How can i get an event to be triggered when a row is saved, it''s something like "RowSaved" in windows form, how do i do it in ASP.net? In Gridgroupingcontrol, although I set the properties PostBackOnFocusedChanged to True, the page wasn''t reloaded when i focused on other row. Please help.

4 Replies

AD Administrator Syncfusion Team October 10, 2005 03:05 PM UTC

Hi Moon, 1) The RecordValueChanged event will be fired, when you change a record and move out of the row. Also take a look at this Knowledgebase Article: http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=312 which tells you the various events that are fired when updating records in the Grid. 2) I was unable to reproduce this behavior in the SelectionModes sample. Can you try reproducing this behavior in the SelectionModes sample that ships with Essential Grid for ASP.NET. Regards Arun


MS Moon Siew Chai October 12, 2005 07:56 AM UTC

Hi Arun, Thank you for your reply. I can get the SelectionModes sample working. By looking at "View Source" from the browser of this sample, I found out that each row has a unique id while in my case, each row has the same id "gridStudent~TR~0~_TOPGROUP_+". I believe due to this, the PostBackOnFocusedChanged seems not working because whenever i double click on a row, it''s always the first row that is highlighted and editable. Do you know how is the unique value derived from in gridgroupingcontrol? Cheers Moon


AD Administrator Syncfusion Team October 12, 2005 05:54 PM UTC

Hi Moon To enable editing you need to have a primary key column, so you need to add a PrimaryKeyColumn to the TableDescriptor before calling DataBind() as shown below to address this issue: [C#] //Add PrimaryKey to the PrimaryKeyColumns collection GridTableDescriptor mainTD = this.GridGroupingControl.TableDescriptor; mainTD.PrimaryKeyColumns.Add("CustomerID"); //Call DataBind this.GridGroupingControl.DataBind(); [VB] ''Add PrimaryKey to the PrimaryKeyColumns collection Dim mainTD As GridTableDescriptor = Me.GridGroupingControl.TableDescriptor mainTD.PrimaryKeyColumns.Add("CustomerID") ''DataBind Me.DataBind() Can you try this out and then post an update. Regards Arun


MS Moon Siew Chai October 14, 2005 01:59 AM UTC

It works! Thanks :)

Loader.
Live Chat Icon For mobile
Up arrow icon