This is a migrated thread and some comments may be shown as answers.

Different Values in GridDropDownColumn at insert/Edit

2 Answers 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rootvik Pancholi
Top achievements
Rank 1
Rootvik Pancholi asked on 24 Jun 2010, 09:05 AM
hi,

How can i check that GridEditCommandColumn button is clicked or Add new Record button is clicked?
I want to bind different datasource in GridDropDownColumn when Add new record button is clicked and different when GridEditCommandColumn is clicked.

Thanks,
Rootvik.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 24 Jun 2010, 10:36 AM
Hi Rootvik,

You can access the dropdown control in ItemDataBound event and set the DataSource according to insert/edit mode.

The documentation shows how to distinguish edit/insert mode in ItemDataBound event.
Distinguish edit/insert mode on ItemCreated/ItemDataBound

And here is another documentation which describes on how to customize the GridDropDownColumn.
Customize/Configure GridDropDownColumn


-Shinu.
0
Rootvik Pancholi
Top achievements
Rank 1
answered on 24 Jun 2010, 10:47 AM
Hi Shinu,

Thank You for your reply.
It worked for me.

Thanks,
Rootvik.
Tags
Grid
Asked by
Rootvik Pancholi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rootvik Pancholi
Top achievements
Rank 1
Share this question
or