How to show the combobox line by line in the DECENDING ORDER in the grid
How to show the combobox line by line in the DECENDING ORDER in the gr
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
How to show the combobox line by line in the DECENDING ORDER in the grid
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Abhishek YadavRank #217 · 11.3K reputationPosted Aug 8, 2023, 1:45 AM EDT
// Assuming you have a combobox control named "comboBox" and a grid control named "grid" // Sort the combobox data source in descending order var dataSource = comboBox.DataSource; dataSource.Sort(); dataSource.Reverse(); // Bind the combobox to the grid grid.DataSource = dataSource; grid.DataBind(); // Render the grid on the frontend grid.RenderControl();