gridview

GridView RowCommand Event is firing twice in UpdatePanel

只谈情不闲聊 提交于 2020-01-06 15:40:24
问题 I am facing a strange problem for last 2 days. My gridview's rowcommand event is firing twice when used inside the UpdatePanel. If I use it outside the update panel. It works as expected. Can anyone guide me how to solve this problem. My sample code is below : ASPX <asp:UpdatePanel ID="upDescription2" runat="server" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigge`enter code here`r ControlID="ddlDescription1" EventName="SelectedIndexChanged" /> </Triggers> <ContentTemplate> <asp

Selecting a gridview row not working in IE but works in Firefox

走远了吗. 提交于 2020-01-06 15:29:11
问题 I have a gridview with checkbox as first column. Whenever I click anywhere in the gridview row (if clicked in checkbox) it should get selected and gridviewrow_selectedindexchanged() method will get invoked. This is working fine in Firefox. When I click the checkbox in gridview, the row in which checkbox lies will get selected and gridviewrow_selectedindexchanged() will get invoked. But this is not working in IE. When I click the checkbox, the row is not getting selected and gridviewrow

How can I get row label's data from Gridview in RowCommand?

浪子不回头ぞ 提交于 2020-01-06 15:26:32
问题 I am using a buttonfield to perform updating of database. However, I couldn't get the row data from GridView despite searching for multiple solutions. I tried something like like : GridViewRow gvRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer); Label lbitemid = (Label)gvRow.FindControl("lblitemid"); but was not successful either. I got this error : System.InvalidCastException: 'Unable to cast object of type 'System.Web.UI.WebControls.GridView' to type 'System.Web.UI.WebControls

How can I get row label's data from Gridview in RowCommand?

三世轮回 提交于 2020-01-06 15:26:27
问题 I am using a buttonfield to perform updating of database. However, I couldn't get the row data from GridView despite searching for multiple solutions. I tried something like like : GridViewRow gvRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer); Label lbitemid = (Label)gvRow.FindControl("lblitemid"); but was not successful either. I got this error : System.InvalidCastException: 'Unable to cast object of type 'System.Web.UI.WebControls.GridView' to type 'System.Web.UI.WebControls

Windows Runtime GridView throws ArgumentException when setting ItemsSource property

匆匆过客 提交于 2020-01-06 15:15:36
问题 I have the following two classes for a RageComic reader metro style app I am making. public class ComicDataWNGroup { public ComicDataWNGroup(string title) { this.Title = title; this.Items = new ObservableCollection<ComicDataItem>(); } public String Title { get; set; } public ObservableCollection<ComicDataItem> Items { get; private set; } } public class ComicDataWNSource { private RedditAPI.RedditManager currentManager; public ComicDataWNSource(RedditAPI.RedditManager currentManager) { this

OutOfMemoryError in my gridAdapter

…衆ロ難τιáo~ 提交于 2020-01-06 14:52:14
问题 I'm trying create adapter for my gridView which should contains photo, which I chose in gallery. But I have following OutOfMemoryError in line "return row" public class GridViewAdapter extends ArrayAdapter<String> { private Context context; private int layoutResourceId; private ArrayList<String> images_urls; public GridViewAdapter(Context context, int layoutResourceId, ArrayList<String> images_urls) { super(context, layoutResourceId, images_urls); this.layoutResourceId = layoutResourceId;

TreeView in GridView

心不动则不痛 提交于 2020-01-06 14:50:48
问题 I know there must be a way to do this, and perhaps someone has already done it. I googled like crazy but found nothing at all. Anyway, what I want to do is have a TreeView in the first column of a GridView using WPF, which can expand and collapse and that will show/hide the row it belongs to, pretty much something like this (the demo is for ASP.NET, I want to be able to do the same in WPF): DevExpress demo In our company we bought Infragistics controls, but it doesn't have a built in solution

ASP.net GridView: get LinkItem's row

十年热恋 提交于 2020-01-06 14:28:55
问题 I want to show "Delete" link in GridView to registred users , therefore I am using templateField: <asp:GridView ID="GridView1" runat="server" AllowSorting="True" OnSorting="GridView_Sort"> <Columns> <asp:TemplateField HeaderText="Control"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" onClick="deleteEntry()" Text="Delete"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Now in my deleteEntry() function how can I know anything about the row in

ASP.net GridView: get LinkItem's row

别说谁变了你拦得住时间么 提交于 2020-01-06 14:28:30
问题 I want to show "Delete" link in GridView to registred users , therefore I am using templateField: <asp:GridView ID="GridView1" runat="server" AllowSorting="True" OnSorting="GridView_Sort"> <Columns> <asp:TemplateField HeaderText="Control"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" onClick="deleteEntry()" Text="Delete"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Now in my deleteEntry() function how can I know anything about the row in

ASP.net GridView: get LinkItem's row

北城以北 提交于 2020-01-06 14:28:23
问题 I want to show "Delete" link in GridView to registred users , therefore I am using templateField: <asp:GridView ID="GridView1" runat="server" AllowSorting="True" OnSorting="GridView_Sort"> <Columns> <asp:TemplateField HeaderText="Control"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" onClick="deleteEntry()" Text="Delete"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Now in my deleteEntry() function how can I know anything about the row in