Binding columns to gridview


Last post May 21, May 17, What after i assign gridview to datasource. The binding columns to gridview i am asking this because my gridview column is a placeholder so it can be a textbox,dropdownlist, radiobutton anything.

I dont do this since I need to do this step programatically: Some placeholder columns will not have data into the database So how do i know which row to populate data with and which rows not to do it Also, my gridview is inside the usercontrol and i am trying to bind the gridview with data from the aspx page binding columns to gridview renders the usercontrol which has gridview. So i have to write the function which renders the gridview columns with data on a different page and thus i dont have access to the RowDatabound event there.

This is what I have See below Now my problem is retrieval of the submitted data. THis is what I have I dont have any Bind in my markup. How do i bind programatically depending on data fron database? May 21, Row to find the PlaceHolder and fill it. However, that will only work well if you don't need it to binding columns to gridview PostBacks.

An alternative option is to put all possible Controls in your Template and bind Visible of each to the condition for it showing up.

Visible is remembered on PostBack. So no need for any code to redo it. This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree binding columns to gridview this use.

Community Websites Community Support. Print Share Twitter Facebook Email. Related Links Guidance Samples Videos. This can be beneficial to other community members reading the thread. When all you've got is a Hammer, Every Problem looks like a Nail.