Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › Object Bind and Editing in cell grid
Tagged: #grid #bind
- This topic has 3 replies, 2 voices, and was last updated 3 years, 7 months ago by 
martin-jq.
 
- 
		AuthorPosts
 - 
		
			
				
March 18, 2022 at 7:31 pm #102974
alexis Escala
ParticipantI have the following problem, I have a grid with a column that needs to render the status of each row. Each row has a status like {code: number, description: string}, I need to show the autocomplete in each cell of the status column:
<div>
<div>statuses: Status[] = [{ “value”: 0, “label”: “UNFULFILLED” }, { “value”: 1, “label”: “LUMP” }, { “value”: 2, “label”: “BOUGHT” },</div>
<div> { “value”: 3, “label”: “VIRTUAL” }, { “value”: 4, “label”: “NEW” },</div>
<div> { “value”: 5, “label”: “ESTIMATED” }, { “value”: 6, “label”: “QUOTE” }, { “value”: 7, “label”: “APPROVED” }, { “value”: 8, “label”: “CONFIRMED” },</div>
<div> { “value”: 9, “label”: “DENIED” }, { “value”: 10, “label”: “PROCESS” }, { “value”: 11, “label”: “REQUESTED” }, { “value”: 12, “label”: “HOLIDAY” },</div>
<div> { “value”: 13, “label”: “EXPIRED” }, { “value”: 14, “label”: “CANCELLED” }, { “value”: 15, “label”: “DECLINED” }, { “value”: 16, “label”: “DENIEDPDN” }];</div>
</div>
<div></div>
<div>The autocomplete should show the complete list of labels and when I choose one option I need to recover the value of this cell.And I need know which is the best way to bind a status when loading the grid.</div>
<div>Is possible? I need help, please.</div>
<div></div>
<div></div>- 
		This topic was modified 3 years, 7 months ago by 
alexis Escala.
 
March 21, 2022 at 5:06 pm #102978martin-jq
ParticipantHello Alexis Escala,
You can use a custom editor to achieve this result.
Please, take a look at the last column of the Grid in this Example.
Best Regards,
MartinSmart HTMLElements Team
https://www.htmlelements.com/April 7, 2022 at 2:11 pm #103053alexis Escala
ParticipantHello Martin, thanks for your answer, I have a question about the example that you mentioned, Why you don’t have a Supplier selected? How I can set a supplier selected in my solution? You can help me with that?
April 7, 2022 at 3:27 pm #103054martin-jq
ParticipantHello Alexis Escala,
This is because this is a custom column that doesn’t have a datafield and an initial value.
I have updated the Example so you can see how you can have a selected value.Best Regards,
MartinSmart HTMLElements Team
https://www.htmlelements.com/ - 
		This topic was modified 3 years, 7 months ago by 
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.