SelectCommand="SELECT -1 as [id],'please choose' as [display],'-1' as [sort] UNION SELECT [budget].[obj_id] as [ID], [budget].[accountnumber] + ' ' + [budget].[description] as [display], [budget].[description] as [sort] FROM [escworks.object] [primary] INNER JOIN [budget] [budget] ON [primary].[obj_pk] = [budget].[obj_id] INNER JOIN [user.multi.budget] [user] ON [budget].[obj_id] = [user].[budget_id] WHERE (([user].[enabled] = 1) ) "
Basically I have four dropdowncontrol in RadGrid1. datasource for activity type and budget defined in design time but for product and activity date datasource is defined in server side. when i insert a new item product and activity date does not show up in the grid.
I thought i need to have coding in RadGrid1_ItemDataBound and RadGrid1_ItemCreated for that. Is my understanding right?. Could you give me any sample example. On insert mode and Edit mode actividate and product binds to grid control but once you updated or inserted , the activitydate and product does not show up/bind to RadGrid1.
Can you confirm that your database is updated properly after insert/update?
Additionally, I suggest that you review this help topic on how to configure/customize GridDropDownColumn and verify you have set up you columns right.
Let me know how it goes.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
yes, the value of activitydate and product_id is being written in database table during insert and update mode.In database datatype for activitydate is set as Nvarchar(500) and product_id as int. The problem i'm having here is activity date and product does not bind to grid control right after insert or update a grid item.
So you are saying i don't need any code in the RadGrid1_ItemCreated event handler for the condition of
You are right i did not have those property set in design time as datasource for activitydate griddropdowncolumn i have defined in code behind.I have DataField only set in design time and other property i have defined in code behind.
This is what i'm doing in the Grid1_ItemDataBound Eventhandler
Please try setting the ListTextField and ListValueField properties of the GridDropDownColumn in the apsx file, directly in the column declaration. Then you can use the following code in order to change the GridDropDownColumn datas source: