http://www.devexpress.com/Support/Center/p/Q248423.aspx
Version imprimable
dans ton lien il fait ça en javascript donc quand il y a action de l'utilisateur.
Moi je cherche a generer un text et a l'afficher dans le memo mais impossible de revenir a la ligne je seche vraiment la ....
Ce n'est pas ce qu'il cherche à faire qu'il fallait retenir, mais l'explication :
Dans un premier temps vérifie cela.Citation:
Our controls support the XHTML DOCTYPE, which should be declared via the DOCTYPE directive in all pages (including master pages). If you accidently remove this line, our controls render incorrectly.
Car comme ce même technicien a dit :
Si tes "n \r\n <newline>" ne marchent pas, c'est que tu as probablement oublié quelque chose (Doctype) car il semblerait que ce soit effectivement la bonne écriture.Citation:
Probably, you've inserted an invalid escape character sequence. I think that if you insert the "\r\n" or "\n" characters, the problem will go away
j'avais déja vérifié et tout étais bon.
j'ai trouver la solution en faisant comme ceci :
merci quand memeCode:box2.Text = "text1" + vbCrLf + "text2"
encore une question (je sais j'en pose beaucoup :p)
comment faire pour récupéré l'index de la ligne lorsque je clique sur le bouton modifier d'une ligne de ma grid ?
Dans ton DataSource, tu n'as pas mis l'id de tes enregistrements ?
Ou tes ID de lignes ne correspondent pas toujours à tes index visuels ?
Sinon pendant l'évenement "CellEditorInitialize" de ton gridView :
Code:Int32 Index = e.VisibleIndex;
j'ai encore un problème !
lorsque j'appel le cellEditorInitialize lorsque je fait des findcontrol plus tard il me renvois des nullreference partout :
Code:
1
2
3
4
5
6 Protected Sub grid_CellEditorInitialize(ByVal sender As Object, ByVal e As ASPxGridViewEditorEventArgs) Handles grid.CellEditorInitialize Dim id As Integer = e.VisibleIndex Dim r As DataRow = grid.GetDataRow(id) End Sub
le problème viens de la ligne :Code:
1
2
3
4
5 Protected Sub btnTestContratRec_Click() Dim pageControl As ASPxPageControl = TryCast(grid.FindEditFormTemplateControl("ASPxPageControl1"), ASPxPageControl) Dim fournisseur As ASPxComboBox = TryCast(pageControl.FindControl("fourRec"), ASPxComboBox) End Sub
des que je l'enleve mes findcontrol refonctionne normalement, j'ai essayer en utilisant l'objet sender mais j'ai le meme problème.Code:Dim r As DataRow = grid.GetDataRow(id)
une idée ?
j'ai trouvé la solution en faisant comme ceci :
Code:
1
2
3
4
5
6
7
8
9
10 Protected Sub grid_CellEditorInitialize(ByVal sender As Object, ByVal e As ASPxGridViewEditorEventArgs) Handles grid.CellEditorInitialize If e.Column.FieldName = "Rec" Then If e.Value = 1 Then Dim pageControl As ASPxPageControl = TryCast(grid.FindEditFormTemplateControl("ASPxPageControl1"), ASPxPageControl) Dim b As ASPxButton = TryCast(pageControl.FindControl("regenRec"), ASPxButton) b.Visible = True End If End If End Sub