Is there a way to turn on multi line for cell editing without using a template field?
In the older ultra web grid it was done like this:
this.UltraWebGrid1.Columns.FromKey("Description").CellMultiline = CellMultiline.Yes;
Is there something similar for a Web data grid?
Thanks
We used a replace in the SQL select with Replace(fieldname,char(13),'<BR>) as fieldnamewhich makes it display fine, but then if you edit the line, you will get a code injection message when it posts.Ug
Hello,
Please create a feature request for this on the follwoing link :
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Rado,
Thanks for your reply. While the above does work, and do what you say, it does not work 100% for our situation.
We are using the CR/LF to parse and split strings. A user may enter the following text:
Click It
Or
Ticket
While the data grid would show the following:
Click It Or
This is an issue the datagrid does not support a true CR/LF, if you examine the text it actually is one single line, just word wrapped. Why does the datagrid not support a CR/LF?
Can I replace the CR/LF ( or char(13) or "\n") into something compatible with your datagrid?
function Button1_onclick() { var val = $get('<%=TextBox1.ClientID %>').value; val = val.replace(/\n/g, "working CR/LF"); var grid = $find('<%=WebDataGrid1.ClientID %>'); var row = grid.get_rows().get_row(0).get_cell(1).set_text(val); }
thanks
I did try this:
function Button1_onclick() { var val = $get('<%=TextBox1.ClientID %>').value; var grid = $find('<%=WebDataGrid1.ClientID %>'); var row = grid.get_rows().get_row(0).get_cell(1).set_text(val); }
Attached to a button.
If the text is longer that the width of the cell it will be automatically transferred to next row in the grid cell.
Thanks.
Currently we have this setup
WebDataGrid -- bound to object data source
TextBox -- Multi-Line enabled, supports carriage return/ line feed
Button -- on button pressed javascript updates webdatagrid cells, then performes postback on datagrid that is inside an update pannel.
---------------------------------------------------
In javascript we have something like this:
selectedRow.get_cell(i).set_value(
$get(
'<%= wte_message.ClientID %>').value);
After cell updates, all carriage return/line feed are gone. We need the CR/LF.