HI,
I have several questions about the wingrid and rowedittemplate.
When adding a row to a grid how can I make it so that the wingrid refreshes and put the the added row on its place in the sorting order of the wingrid can this be done with a simple refresh of do I need to do something else.
When using a rowedittemplate is there a possibility to validate the data enter prior to editing the row.
on some of the edittemplates I'm using the key field is a calculated one and needs to be calculated prior to inserting the new row in the database or updating the new row in the database.
in rowtemplates is there a possiblity to have an onchange event or a validate event triggered on the the fields on the template?
How can you set the focus to the first field on the template that is editable?
Grid export to excel, I have a tool in a ribbon that allows when clicked the export a grid to excell but the problem is that my grids are in MDIChilderen so how can i give the right grid to the export function.
Best Regards
Ronny Gilisen
Hello Ronny,
rgilbeb said: When adding a row to a grid how can I make it so that the wingrid refreshes and put the the added row on its place in the sorting order of the wingrid can this be done with a simple refresh of do I need to do something else.
To do this, you would need to handle the AfterRowUpdate event and perform the sorting required in the event handler.
rgilbeb said: When using a rowedittemplate is there a possibility to validate the data enter prior to editing the row.
Please explain what you mean by validating the data prior to editing the row.
rgilbeb said: on some of the edittemplates I'm using the key field is a calculated one and needs to be calculated prior to inserting the new row in the database or updating the new row in the database. in rowtemplates is there a possiblity to have an onchange event or a validate event triggered on the the fields on the template?
You can handle the Validating event of the editors in the RowEditTemplate.
The problem I'm having is that I have prommactically created a RowedtTemplate and example is a template that allows the user to create and edit Zipcodes. The templates has following Items:
ZIPCodeID
CountryID (Valuelist with all countries)
ProvinceID (Valuelist withh all Belgian Provinces)
Zipcode
City/Locality
The ZIPCodeID is a calculated field which consist of the CountryID (2 Charcter ISO Code) underscore the zipcode and the 3 first characters of the City. I would like to show the ZIPCodeID while the user is filling in the fields it consists of. That is my first problem.
The second is that when the user selects a country different from Belgium that the ProvinceID field should be disabled.