Hi Sir,
I wanted to set dropdown value on client JavaScript event (I am using click event of javascript - webdatagrid) on some condition basis.
so I am using below code but when I set this I am getting 2 (as value) in the dropdowlist it should display text (like 2 is for 'Include' in my case).
var newSelectedCell = e.get_item().get_row().get_index().toString();
if (sender.get_rows().get_row(newSelectedCell).get_cellByColumnKey("WithInPolicy").get_value() == false)
{
sender.get_rows().get_row(newSelectedCell).get_cellByColumnKey("TransitCoverAdditionalOptionChargeId").set_value(2);
}
Please provide me some steps how I can set the value to the dropdown provider of webdatagrid (Ideally it should not display value it should display text in the dropdown list).
Please note that I am using webdatagrid version 11.1.
Regards,
Mahesh Pol
Can someone please provide me the solution on this.
I have found the solution for this as I am setting value to the dropdownlist it was still showing up the value 2 in dropdowlist.
But I was having it should display actually text for value 2 (and not the value itself).
I have added below code after setting the value to dropdownlist I have added set_text to it.
("TransitCoverAdditionalOptionChargeId").set_value(2);
("TransitCoverAdditionalOptionChargeId").set_text('Seperate');
So it solved my issue for displaying text instead of value.
Hello Mahesh,
I am glad that you've managed to find the solution.
Thank you for using our controls!