2014年7月13日 星期日

[RESOLVED] multiple headers gridview


Can we create an editable gridview using the same concept as below(mulitple headers)?


http://www.advancesharp.com/blog/1077/gridview-multiple-header-rows


This works fine but how can we make the gridview editable? Thanks in advance!



To develop an editable gridview, below link will be helpful. It describes different controls you can place inside an editable gridview and how to control them.


http://www.codeproject.com/Articles/37207/Editable-Gridview-with-Textbox-CheckBox-Radio-Butt


Let me know if it helps.



I do this by converting all of my fields to TemplateFields, then removing the ItemTemplate and renaming the EditItemTemplate to ItemTemplate.  This will make the ItemTemplates have TextBoxes.  I also add a CheckBox, and use this to tell if I should update
this row.  The GridView's columns would be something like this:





























I then put an Update button outside of the GridView, and when clicked, read the GridView row by row, and if the CheckBox is checked, I update the data in that row.





paindaasp



I then put an Update button outside of the GridView, and when clicked, read the GridView row by row, and if the CheckBox is checked, I update the data in that row.





Where is the logic for multiple headers in your code?





sam1980



Can we create an editable gridview using the same concept as below(mulitple headers)?


http://www.advancesharp.com/blog/1077/gridview-multiple-header-rows


This works fine but how can we make the gridview editable? Thanks in advance!





It's not there, I assumed that you already had the multiple headers working.  I try to stay away from multiple headers in GridViews and use Repeaters for that.


沒有留言:

張貼留言