Title: Datagrid problem with lines, that have newline and carriage return characters Post by: jmansur on November 16, 2015, 06:16:20 AM Hello.
I have a problem with a datagrid . I have a data entry screen with a textbox , then each data is displayed in a datagrid . But when in the textbox text data are loaded with newline and carriage return, in the datagrid records are not displayed . You have to configure something ? Best Regards Title: Re: Datagrid problem with lines, that have newline and carriage return characters Post by: jarry on November 16, 2015, 06:29:18 PM Please describe your question in a bit more detail, or provide an example to demonstrate your issue.
Title: Re: Datagrid problem with lines, that have newline and carriage return characters Post by: jmansur on November 17, 2015, 05:47:44 AM I have this datagrid.
// ******************************************************************** // Defino el datagrid para recuperar todas las informaciones de trabajo // ******************************************************************** $('#dgIT').datagrid({ url:'Ajax/get_IT.asp', width: '100%', height: '100%', autoRowHeight:true, autoSizeColumn:true, toolbar: '#tbDgIT', // Establece cual es el toolbar del grid collapsible:false, fitColumns:true, loadMsg: 'Procesando: Aguarde un momento.', striped:true, multiSort:false // habilita o sehabilita el multisort del grid }); this are the fields that I show in the datagrid. FechaCarga UsuarioCarga It --> (this text can contain multiple lines) If the "It" field contain the newline character and carriage return character, any record are load into the grid. And this is the ajax <!-- #include virtual="Apl/SMR/Clases/ClassSMRIncidentes.asp" --> <!-- #include virtual="Global/Clases/ClassDbConnect.asp" --> <!-- #include virtual="Global/Clases/ClassAdoDb.asp" --> <% response.Charset="ISO-8859-1" Dim oSF Set oSF = New SMRIncidentes ' Vinieron los filtros f_NroIncidente = Request("NroInc") f_ItId = request("ItId") Cantidad = oSF.getIT( f_NroIncidente, f_ItId ) rsa = oSF.rsRowsSet sRow = "[" For i = 0 To Cantidad - 1 sRow = sRow & "{" sRow = sRow & "'NroIncidente':'" & rsa(i).Item("NroIncidente") & "'," sRow = sRow & "'ItId':'" & rsa(i).Item("ItId") & "'," sRow = sRow & "'FechaCarga':'" & rsa(i).Item("FechaCarga") & "'," sRow = sRow & "'It':'" & rsa(i).Item("It") & "'," sRow = sRow & "'DescAdjunto1':'" & rsa(i).Item("DescAdjunto1") & "'," sRow = sRow & "'DescAdjunto2':'" & rsa(i).Item("DescAdjunto2") & "'," sRow = sRow & "'DescAdjunto3':'" & rsa(i).Item("DescAdjunto3") & "'," sRow = sRow & "'ExtAdj1':'" & rsa(i).Item("ExtAdj1") & "'," sRow = sRow & "'ExtAdj2':'" & rsa(i).Item("ExtAdj2") & "'," sRow = sRow & "'ExtAdj3':'" & rsa(i).Item("ExtAdj3") & "'," sRow = sRow & "'UsuarioCarga':'" & rsa(i).Item("UsuarioCarga") & "'," sRow = sRow & "'OrgCodigo':'" & rsa(i).Item("OrgCodigo") & "' " sRow = sRow & "}" if i < Cantidad - 1 then sRow = sRow & "," end if Next sRow = sRow & "]" sRow = Replace(sRow,Chr(39),Chr(34)) sRow = Replace(sRow,Chr(10),Chr(32)) // Replace newline with space to work datagrid sRow = Replace(sRow,Chr(13),Chr(32)) // Replace carriage return with space to work datagrid response.write(sRow) %> Title: Re: Datagrid problem with lines, that have newline and carriage return characters Post by: jarry on November 17, 2015, 06:24:24 PM If you want to display multiline text on a cell, please define the 'formatter' function to convert the CR+LF to <br>.
Code: var data = [ Title: Re: Datagrid problem with lines, that have newline and carriage return characters Post by: jmansur on November 18, 2015, 05:50:59 AM thankssssssssssssssssssssssssss
|