Here during BatchUpdaing mode issue I am facing the following issue
Based on attached sample you can verify the following.
1.Before updating the DateCell , datatype is string. After updating the cell it become Object(js Date type). How to maintain the consistancy?verify By Clicking update button
2.Existing in Row , WebDropDownProvider Cell(officerType) retrieving cell Text using get_value() retrieving the textfield value,(like supervisor) Not valuefield value.(By Clicking update button u can verify this).But Add New Row in WebDropDownProvider cell (officertype) retrieving cell text using get_value() retrieving value field.("1"). How reterirve the Value for WebDropDownProvider Cell always?
3.Add New Row whether we need to specify all the value for all the columns like (DataKeyFields- Unique, Number Field as 0, string fields and datafields as null) like default.aspx script tag in attached sample. Please Confirm
If possible provide us sample BatchUpdating mode in client side and retrieving values with specific type in the value.
Hi varadarajan,
For the first issue, what you are bumping-up-against here is that Dates evaluate as 'Objects' in javascript. So if you are checking the DataType when the row is added to the batch (or in the 'dirty' state), you will see it as an 'object'. If you check it after committing it to the server, you will see it as a 'string'. For more on this --> http://stackoverflow.com/questions/643782/how-to-know-if-an-object-is-a-date-or-not-with-javascript
For your second question, can you restate? Perhaps you can detail your steps-to-reproduce, what you are experiencing and what you are expecting. Thanks!
For the third question, you will need to specify a value for each column you are sending to the data source. I have attached an example for your reference. As you review you will see my columns and add row function as:
<ig:BoundDataField DataFieldName="WineID" Key="WineID">
<Header Text="WineID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="ProductName" Key="ProductName">
<Header Text="Product Name" />
<ig:BoundDataField DataFieldName="Region" Key="Region">
<Header Text="Region" />
<ig:BoundDataField DataFieldName="Country" Key="Country">
<Header Text="Country" />
<ig:BoundDataField DataFieldName="VintageYear" Key="VintageYear">
<Header Text="Vintage Year" />
<ig:BoundDataField DataFieldName="CategoryID" Key="CategoryID">
<Header Text="Category ID" />
<ig:BoundDataField DataFieldName="AverageUnitPricePerBottle" Key="AverageUnitPricePerBottle">
<Header Text="Avg Price" />
<ig:BoundCheckBoxField DataFieldName="RecommendToFriend"
Key="RecommendToFriend">
<Header Text="Recommend" />
</ig:BoundCheckBoxField>
<ig:BoundDataField DataFieldName="TroyRating" Key="TroyRating">
<Header Text="TroyRating" />
.....
function AddNewRow() {
var idincr = setRowIncr() + 1;
var oGrid = $find("<%=WebDataGrid1.ClientID %>");
var newRow = new Array(idincr, "New Wine", "Sonoma", "UnitedStates", "06/02/2014", 10, 0.00, false, 0);
oGrid.get_rows().add(newRow);
idincr++;
}
Please let me know if you need additional assistance regarding this matter.
**Please note that I omitted the style sheets due to file size constraints. For proper styling of the grid you will need to bring the ig_res folder back into the project. You can do this by opening the project in the designer and select 'OK' when prompted to accept the sytle sheets.
Hi Troy,
Thanks for your sample.
For the Second Question
Is it possible to retrieve the cell.get_value() returns value instead text for DropDownProvider unedited Columns ?
Please provide sample.
var val = cell.get_value() this statemen needs to returns value assoicatied with text for dropdown provider columns.
Thanks,
Regards,
varadarajan.m
Hi,
I have modified your code instead of Product Name i used WineID for DropDownProvider Column.Now get_text and get_value both are returning two different values.
You can verify this by clicking Ver12_2 buttonWhen i run the above code 14.1 dll it is returning same value for both get_text and get_value.
Please verify and clarify what needs to be done for this issue to get_text and get_value retrieve two different values in 14.1
Hi varadarjan,
Thank you for sending along this modified file. This clarifies for me what you are doing and I can confirm that I see this issue breaking with the initial build of 14.1 (20141.2011). This was an issue that occured in source code, but the good news is that it issue is now fixed and will be reflected with the upcoming service release that is approximated for July 15.
Please let me know if you need any additional assistance regarding this matter.
Please let me know if you need any additional assistance regarding this.
We are currently waiting for this release DropDown Provider Issue.Thanks for the response.
And also Is it possible maintain the consistency for date fields in client side(either string and js object) ,the first question in this post i asked also can be fixed in next release.
Varadarajan.M
Hi Varadarajan,
The hotfix for the dropdown issue is approximated for July 15.
For the date issue, the Date object is handled differently in javascript as compared to server-side. This is not soemthing that is in the control of Infragistics but rather how javascript handles the Date object. This post explains this well: http://stackoverflow.com/questions/643782/how-to-know-if-an-object-is-a-date-or-not-with-javascript