Hi!
I ́m using a MultiEditingRow GridView binded to an IList and one column has ComboBoxes, binded to another IList.
In order to show rows previously created I use: Value='<%# Eval("Column")%>' and with the Init events the Grid works OK =)
However, I have one little issue:
The ComboBox doesn ́t accept the Value statement so I can ́t show the "CargoContacto" of each row.
I ́m attaching a sample project to clarify my problem…
I hope your answer,
Best regards,
Seb . .
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Seb,
Thank you for your project, I have examined and modified it a little bit.
To bind a cascaded combobox to a grid data field you need to assign an appropriate bind expression to the ASPxComboBox.Value property. A markup of the bound combobox will look like:
<dx:ASPxComboBox ID="cmbCargoContacto" runat="server" OnInit="CargoContacto_Init" Width="100%" ValueField="IdCargoContacto" ValueType="System.String" TextField="Nombre" Value='<%# Bind("CargoContacto.Nombre") %>'/>
where the "CargoContacto.Nombre" property is a property of the 'Contacto' row data item.
If you have other questions, you are welcome to contact us at any time.
Best regards,
Vladimir
Vladimir, thanks a lot for your answer and your project attached…
Is very usefull that you send me a project with the modifications, so I can test it and read the right code =)
You have always the perfect answer guys,
Thanks a lot again,
Seb . .
Hello,
I was glad to help you. If you have other questions, you are welcome to contact us at any time.
Best regards,
Vladimir
Vladimir, your project really solved my issue. However, another problem emerged. After showing all the rows, I want to made some changes and save those in my IList. When I clicked on the button, I invoque a method that, in other contexts, works OK (I ́m using it in other projects), but here, an error is shown:
"It ́s not possible to convert TypeConverter from System.String."
I hope you can help me this time,
Best regards,
Seb . .
Hello Luciano,
Thank you for the reactivation.
I have examined your project and suggest you disable the grid row cache to solve the problem. You can do it in the grid markup:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" ClientIDMode="AutoID" EnableRowsCache="false"> ......
Also you can see the TypeConverter cannot convert from System.String report for more details.
However, this method is not suitable in all cases. It is possible that the best way for you is to implement a custom converter class nested from the 'TypeConverter'. Please see the How to implement a custom TypeConverter class for an XPO object examlpe.
Best regards,
Vladimir
Vladrimir,
Thanks a lot for your approach and all the information you have provided me =)
I disabled the grid row cache and the problem was solved.
I ́m going to take a look to the links that you have send me…
Best wishes,
Seb . .
Hello,
I was glad to help you. If you have other questions, you are welcome to contact us at any time.
Best regards,
Vladimir