I have an application and i used Telerik rad controls in this app , in RadGrid i want to add a column that have a combo and another column that have a button , user select an action in combo (such as edit/delete/update record status ) and push the button and then system do the action , but i cant add a combo with this situation in RadGrid
please help
thanks
please help
thanks
6 Answers, 1 is accepted
0
Hi Mohammad,
Thank you for writing.
You can add GridViewComboBoxColumn and bind it to a list that contains the desired items:
Let me know if you have additional questions.
Regards,
Dimitar
Telerik
Thank you for writing.
You can add GridViewComboBoxColumn and bind it to a list that contains the desired items:
GridViewComboBoxColumn myColumn =
new
GridViewComboBoxColumn();
myColumn.Name =
"Action Column"
;
myColumn.DataSource =
new
List<
string
>{
"Add"
,
"Delete"
,
"Edit"
};
myColumn.Width = 200;
this
.radGridView1.Columns.Add(myColumn);
Let me know if you have additional questions.
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Mohammad
Top achievements
Rank 1
answered on 14 Oct 2014, 06:51 PM
thanks Dimitar for your attention
but i fill my gridView with DataTable and a sql command
i was write a code like you suggest but it's not work
the column it's not a combo it's empty
thanks again
Regards
but i fill my gridView with DataTable and a sql command
i was write a code like you suggest but it's not work
the column it's not a combo it's empty
thanks again
Regards
0
Mohammad
Top achievements
Rank 1
answered on 16 Oct 2014, 01:09 PM
can anyone help me ?
0
Hello Mohammad,
Thank you for writing back.
In this case you should put the cell in edit mode first, then you will see the editor and you will be able to pick a value. In addition I have created a small sample to show you how the desired grid can be achieved. Please note that you can have bound and unbound columns in the grid.
I hope this helps.
Regards,
Dimitar
Telerik
Thank you for writing back.
In this case you should put the cell in edit mode first, then you will see the editor and you will be able to pick a value. In addition I have created a small sample to show you how the desired grid can be achieved. Please note that you can have bound and unbound columns in the grid.
I hope this helps.
Regards,
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Mohammad
Top achievements
Rank 1
answered on 24 Oct 2014, 11:55 AM
thanks again for your answer and example
how can i put on cell in edit mode ??
i dont want to let the user edit records in gridview
how can i put on cell in edit mode ??
i dont want to let the user edit records in gridview
0
Hi Mohammad,
Thank you for writing back.
You can disable the editing for particular columns by setting the ReadOnly property of each column that you do not want the user to be able to make changes to. For example you can make the first 4 columns in the grid read only like this:
In addition you can put the cell in edit mode by just clicking it, this will create the proper editor and will allow you to chose one of the values (see attached image).
I hope this will be useful.
Regards,
Dimitar
Telerik
Thank you for writing back.
You can disable the editing for particular columns by setting the ReadOnly property of each column that you do not want the user to be able to make changes to. For example you can make the first 4 columns in the grid read only like this:
for
(
int
i = 0; i < 4; i++)
{
radGridView1.Columns[i].ReadOnly =
true
;
}
In addition you can put the cell in edit mode by just clicking it, this will create the proper editor and will allow you to chose one of the values (see attached image).
I hope this will be useful.
Regards,
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.