Search Results

Search found 1260 results on 51 pages for 'gridview'.

Page 6/51 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • ListView GridView column

    - by plotnick
    I got a ListView with GridView and GridViewColumns in it. <ListView> <ListView.View> <GridView> <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> Now I want in my code to disable the Combobox or entire column. And I don't know how to do it. Help me please.

    Read the article

  • ASP.NET GridView and UpdatePanel

    - by Echilon
    I have a GridView, inside a UserControl, inside an UpdatePanel on a page. There's a button in the GridView which needs to fire a postback. What happens is: User clicks button - RowCommand Fires - Custom event is raised on UserControl - Page detects this and changes the active view index for a multiview and also the page title and some other controls outside the UpdatePanel. The problem is, the page posts back asyncchronously, the page title changes, but the actions requireing a full postback don't happen because a full postback doesn't occur. To register the button as a postback trigger I'm using: ImageButton btnResults = e.Row.FindControl("btnResults") as ImageButton; ScriptManager scrCurrent = ScriptManager.GetCurrent(this.Page); if (btnResults != null && scrCurrent != null) { scrCurrent.RegisterPostBackControl(btnResults); } I know this is a bit of a complicated problem, but I'd really appreciate any help.

    Read the article

  • Problems with Optimistic Concurrency through an ObjectDataSource and a GridView

    - by Bloodsplatter
    Hi I'm having a problem in an ASP .NET 2.0 Application. I have a GridView displaying data from an ObjectDataSource (connected to a BLL class which connects to a TabledAdapter (Typed Dataset using optimistic concurrency). The select (displaying the data) works just fine, however, when I update a row the GridView does pass the old values to the ObjectDataSource. <DataObjectMethod(DataObjectMethodType.Update, True)> _ Public Function UpdateOC(ByVal original_id As Integer, ByVal original_fotonummer As Integer, ByVal original_inhoud As String, ByVal original_postdatum As Date?, ByVal fotonummer As Integer, ByVal inhoud As String, ByVal postdatum As Date?) As Boolean Dim tweets As TwitpicOC.TweetsDataTable = adapterOC.GetTweetById(original_id) If tweets.Rows.Count = 0 Then Return False Dim row As TwitpicOC.TweetsRow = tweets(0) SmijtHetErIn(row, original_fotonummer, original_inhoud, original_postdatum) row.AcceptChanges() SmijtHetErIn(row, fotonummer, inhoud, postdatum) Return adapterOC.Update(row) = 1 End Function Public Sub SmijtHetErIn(ByVal row As TwitpicOC.TweetsRow, ByVal original_fotonummer As Integer, ByVal original_inhoud As String, ByVal original_postdatum As Date?) With row .fotonummer = original_fotonummer If String.IsNullOrEmpty(original_inhoud) Then .SetinhoudNull() Else .inhoud = original_inhoud If Not original_postdatum.HasValue Then .SetpostdatumNull() Else .postdatum = original_postdatum.Value End With End Sub And this is the part of the page: <div id='Overzicht' class='post'> <div class='title'> <h2> <a href='javascript:;'>Tweetsoverzicht</a></h2> <p> Overzicht</p> </div> <div class='entry'> <p> <asp:ObjectDataSource ID="odsGebruiker" runat="server" OldValuesParameterFormatString="" SelectMethod="GetAll" TypeName="TakeHomeWeb.BLL.GebruikersBLL"></asp:ObjectDataSource> <asp:ObjectDataSource ID="odsFoto" runat="server" SelectMethod="GetFotosByGebruiker" TypeName="TakeHomeWeb.BLL.FotosBLL"> <SelectParameters> <asp:ControlParameter ControlID="ddlGebruiker" DefaultValue="0" Name="userid" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> <form id="form1" runat="server"> <asp:Label runat="server" AssociatedControlID="ddlGebruiker">Gebruiker:&nbsp;</asp:Label> <asp:DropDownList ID="ddlGebruiker" runat="server" AutoPostBack="True" DataSourceID="odsGebruiker" DataTextField="naam" DataValueField="userid" AppendDataBoundItems="True"> <asp:ListItem Text="Kies een gebruiker" Value="-1" /> </asp:DropDownList> <br /> <asp:Label runat="server" AssociatedControlID="ddlFoto">Foto:&nbsp;</asp:Label> <asp:DropDownList ID="ddlFoto" runat="server" AutoPostBack="True" DataSourceID="odsFoto" DataTextField="url" DataValueField="id" AppendDataBoundItems="True"> <asp:ListItem Value="-1">Kies een foto...</asp:ListItem> </asp:DropDownList> <br /> <div style="float: left"> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="odsTweets"> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" /> <asp:BoundField DataField="fotonummer" HeaderText="fotonummer" SortExpression="fotonummer" /> <asp:BoundField DataField="inhoud" HeaderText="inhoud" SortExpression="inhoud" /> <asp:BoundField DataField="postdatum" HeaderText="postdatum" SortExpression="postdatum" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="odsTweets" runat="server" ConflictDetection="CompareAllValues" DeleteMethod="DeleteOC" OldValuesParameterFormatString="original_{0}" SelectMethod="GetTweetsByFotoId" TypeName="TakeHomeWeb.BLL.TweetsOCBLL" UpdateMethod="UpdateOC"> <DeleteParameters> <asp:Parameter Name="original_id" Type="Int32" /> <asp:Parameter Name="original_fotonummer" Type="Int32" /> <asp:Parameter Name="original_inhoud" Type="String" /> <asp:Parameter Name="original_postdatum" Type="DateTime" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="original_id" Type="Int32" /> <asp:Parameter Name="original_fotonummer" Type="Int32" /> <asp:Parameter Name="original_inhoud" Type="String" /> <asp:Parameter Name="original_postdatum" Type="DateTime" /> <asp:Parameter Name="fotonummer" Type="Int32" /> <asp:Parameter Name="inhoud" Type="String" /> <asp:Parameter Name="postdatum" Type="DateTime" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="ddlFoto" Name="foto" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> </div> </form> </p> </div> </div> I've got a feeling there's huge fail involved or something, but I've been staring at it for hours now and I just can't find it.

    Read the article

  • ASP.NET - Overriding Gridview OnRowCreated to add sort images -- columns are null

    - by Zach
    I'm overriding the onrowcreated to add sort images to the header row of a gridview. This works, but actually adding a sortexpression doesn't. What I want to do is set the images as imagebuttons and set their commandarguments to the sort expression of the column they are sorting for. I would assume I could get the cell and from it's index get the gridviewcolumn. Then, I could just get the sortexpression of the gridview column, but this does not work. The columns are null. OnRowCreated Code snippet below: //if this is the header row, we add sort images to each cell if (row.RowType == DataControlRowType.Header) { //iterate through the cells for (int i = 0; i < row.Cells.Count; i++) { //if the column is sortable and visible if (this.Columns[i].SortExpression != string.Empty && this.Columns[i].Visible) { string strSort = this.Columns[i].SortExpression; } } } Can we not get columns in OnRowCreated like this?

    Read the article

  • Problem with Efficient Gridview paging without datasource control

    - by Ronnie Overby
    I am trying to do efficient paging with a gridview without using a datasource control. By efficient, I mean I only retrieve the records that I intend to show. I am trying to use the PagerTemplate to build my pager functionality. In short, the problem is that if I bind only the records that I intend to show on the current page, the gridview doesn't render its pager template, so I don't get the paging controls. It's almost as if I MUST bind more records than I intend to show on a given page, which is not something I want to do.

    Read the article

  • Update gridview from code behind in asp.net

    - by Zerotoinfinite
    Hi Experts, I have gridview in my asp.net 3.5 application [C#]. Which looks like this: AutoGenerateDeleteButton="true" DataKeyNames="studentId" runat="server" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowUpdating="GridView1_RowUpdating" onpageindexchanging="GridView1_PageIndexChanging" onrowupdated="GridView1_RowUpdated" <EmptyDataTemplate> <asp:Label ID="lblNoRecord" runat="server" Text="No Record Found" ForeColor="Red"></asp:Label> </EmptyDataTemplate> </asp:GridView> Now, In rowUpdating event, I am writing the below code: protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int mytext = Convert.ToInt16(GridView1.Rows[e.RowIndex].Cells[1].Text); string cConatiner = GridView1.Rows[e.RowIndex].Cells[4].Text; } In this, myText is giving me the correct value, i.e. of the 1st column but when I am changing the cell value to 1,2,3,4,5,6 I am getting empty. Am I doing it incorrectly ? Please help me. Thanks in advance.

    Read the article

  • Need help in radiobutton within gridview

    - by sumit
    Hi all, Thru radio button i am selecting the data from gridview. Here all radio buttons are selectable at a time. Actually it should not happen at a time user can select only one button which i could not do. My second problem is when i am selecting particular radiobutton that details should be displayed in text box. I have Itemid, ItemName, Quantity, Rate and Total field in gridview. These values i have inserted thru textbox so i have all the corresponding text box for all. So once i select particular radiobutton those details should be displayed in corresponding textbox. I have done the insertion coding for this but couldn't do selecting thru radiobutton and dispalying in textbox. Pls somebody help me in coding for this problem. Thanks, sumit

    Read the article

  • Using jQuery in a GridView?

    - by Matt
    I have a traditional ASP.NET GridView. Inside of it I have a Template Field with edit capabilities. I need to use a jQuery autocomplete plugin on the edit piece. It works anywhere but inside of this GridView. In other words, I know the plugin works. Here is the ASP.NET stuff (yes, I'm using a SqlDataSource): <%# Eval("INGREDIENT_CODE") % And here is the jQuery in the document.ready(): $('[id$=txtEditIngredients]').autocomplete("LookupCodes.aspx?type=IC", { mustMatch: true }); What might I be doing wrong here?

    Read the article

  • How to return focus from GridView or DataGrid to other control on the page

    - by Senthilkumar
    I Want to know how to focus to control after completing tab navigation for the grid view. I have certain controls in my page and GridView/DataGrid as last control, when I navigate (Tab key navigation) on my page. I can navigate from first control to GridView but when I finish all editable items in grid the tab control goes to browser address bar. I need this should focus to again first control on the page. My question is how can I do this? If it is an ordinary controls then I can use (on key down) attribute of the same.. here how can I get access to the last row's last column on the grid view.

    Read the article

  • Export GridView to TXT, then upload file to server

    Basically what I want to do is export an array (or GridView) to a file called "getpathin.dat". That is easy, but the method I am using downloads the file to my computer, which is what I don't want. I want to write an array to either a PRE-EXISTING file that is on the server OR create a new file on the server in a folder, and this new file will contain either the array or the gridview, which I have stored in the array. i'll be doing this in... Visual Studio 2008/SQL Server using C#

    Read the article

  • How to force asp.net GridView control to wrap first row within <thead> </thead> tags

    - by burak ozdogan
    Hi, I want to use Christian Bach's tableSorter client-side table sorting jQuery plugin with my asp.Net GridView control. But the problem is, in the documentation it writes: tablesorter works on standard HTML tables. You must include THEAD and TBODY tags: And unfortunately asp.net renders my GridView only with tags and header row stays within as the 1st row. I have tried: dgvRate.HeaderRow.TableSection = TableRowSection.TableHeader; after calling .DataBind(); It only helped to have <TH></TH> within the header . But still everything is inside <tbody> Can I accomplish this, I mean moving my 1st row from <tbody></tbody> to <thead></thead> ? I do not want to add it manually on PreRender stage; I am sure this could be handled much simpler, isn't it? thanks

    Read the article

  • How to evenly space out GridViewColumns in GridView?

    - by Kugel
    Hello, This is my XAML: <ListView ItemsSource="{Binding Items}"> <ListView.View> <GridView> <GridViewColumn Header="Property1" DisplayMemberBinding="{Binding Property1}" /> <GridViewColumn Header="Property2" DisplayMemberBinding="{Binding Property2}" /> </GridView> </ListView.View> </ListView> I want these 2 columns to take up the width of ListView in 1:1 ratio. How can I achieve this?

    Read the article

  • gridview dropbox

    - by tbischel
    I'm trying to use a GridView to display a list of components in ASP.NET. I'm trying to make it editable at the same time. One of the columns is a string that should be selected out of a list when the user edits the row. So I've tried the following: Convert the BoundField row to an ItemTemplate Add a dropbox to the template window in the gridview bound the selecteditem to the string At this point, I get an error because the list items haven't been set up in the dropbox. So I guess the two things I'm wondering are: How do I assign the items in the dropbox to a dynamically created list of options? How do I make the dropbox only appear when the row is being edited?

    Read the article

  • how can i use a javascript in gridview row

    - by cagin
    hi there, I want to use a flash chart in a gridview. you can see my codes in below: DataTable tbl = new DataTable(); tbl.Columns.Add("chart"); DataRow rw; rw = tbl.NewRow(); rw["chart"] = @"<div id=""chart5Div""></div> <script type=""text/javascript""> var chart = new FusionCharts(""Charts/FCF_MSLine.swf"", ""ChId1"", ""500"", ""300""); var strXml = ""<graph numdivlines='4' lineThickness='3' showValues='0' numVDivLines='10' formatNumberScale='1' rotateNames='1' decimalPrecision='1' anchorRadius='2' anchorBgAlpha='0' numberPrefix='$' divLineAlpha='30' showAlternateHGridColor='1' yAxisMinValue='800000' shadowAlpha='50' >""; strXml += ""<categories >""; strXml += ""<category Name='Jan' />""; strXml += ""<category Name='Feb' />""; strXml += ""<category Name='Mar' />""; strXml += ""<category Name='Apr' />""; strXml += ""</categories >""; strXml += ""<dataset seriesName='Current Year' color='A66EDD' anchorBorderColor='A66EDD' anchorRadius='4'>""; strXml += ""<set value='1127654' />""; strXml += ""<set value='1226234' />""; strXml += ""<set value='1299456' />""; strXml += ""<set value='1311565' />""; strXml += ""</dataset>""; strXml += ""</graph>""; chart.setDataXML(strXml); chart.render(""chart5Div""); </script>"; tbl.Rows.Add(rw); GridView1.DataSource = tbl; GridView1.DataBind(); I must create dynamicly my datasource. But i can see just string value instead of my chart in gridview when page running. But chart code is running correctly between table tags. How can i use these codes in gridview?? KR

    Read the article

  • How to maintain status of gridview checkbox

    - by Royson
    Hi, On my form on left side i have tree-view with check-boxes and on right side grid-view with check-box column. Treeview shows all folders. if user clicked on treenode their files all displayed in gridview. If user checked some files and selects another node and return back it should display checked files as it is. How do i maintain grid-view checked-box column status..? One more query If i checked specific node it should checked all rows of a gridview. Thanks. I am using VS-2008 2.0

    Read the article

  • Using 'DataKeyNames' on an ASP.NET GridView control, causes exception on DataBind() call

    - by azam
    Hi I have an ASP.NET 3.5 WebForms application. Using a GridView control and the DataKeyNames attribute <asp:GridView ID="data" runat="server" DataKeyNames="ID"> <Columns> <asp:BoundField DataField="ID" /> <!-- this binds --> If I take out the DataKeyNames="ID" it binds the data. I would really like to try and use DataKeyNames so I don't need to have the ID column in the columns list. Error: DataBinding: 'Nmspace.MyClass' does not contain a property with the name '"ID"'. Please help.

    Read the article

  • Making GridView Respond to 2 Drop Down Lists

    - by raziiq
    Hi there. I have got 2 Drop Down Lists on my Form and 1 GridView. I want GridView to display the data according to selection from the Drop Down Lists. For Example, One Drop Down List contains Names and other contains Dates. Both the Drop Down Lists can post back. So if i select a name from 1st Drop Down list, the Grid View should show all the results according to that Name. Similarly if i select the Date from the other Drop Down List , the Grid View should show the results according to the dates. But i cant figure out as how to bind Grid View to respond to 2 Drop Down List. BTW i am binding both the Drop Down Lists and the Grid View to the DataSource Objects, which is getting data from the database. Any Suggestions??

    Read the article

  • Unable to Hide Update Button in GridView Editing

    - by nitinkhanna
    Hi, I am using commandfield edit button to edit the row of the gridview. But unable to perform the basics. This gridview is in update panel. When I press Edit button it shows UPDATE and CANCEL button but when I press UPDATE button it updates the DB but UPDATE button doesn't go back to EDIT one. While Cancel is working as it should. Like on pressing CANCEL it goes back to EDIT button, What I am doing worng. Thanks.

    Read the article

  • C# gridview nested in repeater update

    - by Padawan
    My current situation is to display an unknown number of Plantypes and within those Plantypes display a list of Participants(also unknown number), the participants have a textbox and a dropdown that is editable (you can't edit the individual rows, there is one update that does a bit of validation then updates all rows.) I currently have a gridview nested withing a repeater, the repeater displays the Plan in a label and OnItemDataBound I call a method to populate the gridviews. It looks great, but I can't figure out how to save all the data at once. I'm not opposed to handling this a different way, as in loose the gridview and or repeater, if someone has a better idea. This is C# and framework 2.0...there is no sorting or paging on the gridviews...just some links and the fields to update. thanks in advance, Padawan

    Read the article

  • How to remove the auto added column (HeaderRole=Padding) in WPF GridView

    - by dnr3
    Hi, I'm trying to make a custom gridview in WPF but I just realized that as this link says: The GridViewHeaderRowPresenter class performs layout for the column headers in a GridView and places an additional column header at the end to add space and because of the additional column header at the end, there's an extra column to the right of the last column. so I was wondering if I can modify it, please refer to this image below My questions are: Is there anyway I can remove the 'A' part from the grid? Is there anyway I can add the same effect of 'B' part (the role = padding header) to the 'C' Part (before the first column)? Thanks

    Read the article

  • Gridview SortExpression with 2 fields

    - by aron
    Hello, I have a GridView that get's its datasource from a complex object. So I'm doing the Sorting & Paging in the code behind. <asp:GridView ID="SystemsDetailList" runat="server" AllowSorting="true" AllowPaging="true" AutoGenerateColumns="False" ShowFooter="True" OnPageIndexChanging="gridView_PageIndexChanging" OnSorting="gridView_Sorting"> For an important title column I have a SortExpression with 2 fields: SortExpression="FunctionalAreaDisplayCode, EswbsDisplayCode" This in the code behind: protected void gridView_Sorting(object sender, GridViewSortEventArgs e) { BindSystemList(e.SortExpression, sortOrder); } public string sortOrder { get { if (ViewState["sortOrder"].ToString() == "desc") { ViewState["sortOrder"] = "asc"; } else { ViewState["sortOrder"] = "desc"; } return ViewState["sortOrder"].ToString(); } set { ViewState["sortOrder"] = value; } } For some reason it will keep "FunctionalAreaDisplayCode" always sorted ASC but the EswbsDisplayCode works fine as it flips between ASC and DESC correctly. and tips here? thanks!

    Read the article

  • Adding on touch event to images inside gridview

    - by Steve
    I have a gridview where each item has a image and a textview (an app), i added the onItemClick to the gridview in order to launch the app, i also removed the orange selection and made selector in xml so when pressed the text would change to grey and on release it would return to white. My problem is that i need the image to apply an alpha value when pressed and restore the previous alpha on release i tested a lot of ways and none did worked correctly. I came close with the updated answer from the autor of the question: How to set alpha value for drawable in a StateListDrawable?, but some how the state pressed never gets called, i don´t know if this is because i am using the onitemClick to launch the app or not. Also i since i can´t define the alpha on imageview xml i don´t know what else to do Any help will be appreciated

    Read the article

  • Populating a Combobox inside a Gridview

    - by Nawait
    i'm having a few problems working with a gridview and a combobox inside of it. Here is the code for my ListView control: <ListView Height="139" HorizontalAlignment="Left" Margin="10,158,0,0" Name="lvAppointment" VerticalAlignment="Top" Width="250" MinWidth="350"> <ListView.View> <GridView> <GridViewColumn Header="Appointment" Width="120"> <GridViewColumn.CellTemplate> <DataTemplate> <DatePicker SelectedDate="{Binding Path=Appointment}"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Type" Width="170"> <GridViewColumn.CellTemplate> <DataTemplate> <ComboBox ???/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Done" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=Done}" IsThreeState="False"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> I'm popluating the list from a sql ce database via c# with the following code using (SqlCeCommand sqlCeAppointment = new SqlCeCommand("SELECT appid,appointment,done,apptype.type FROM appointment INNER JOIN apptype ON appointment.refatid = apptype.atid WHERE refeventid = @eventid;", sqlCeConn)) { sqlCeAppointment.Parameters.AddWithValue("@eventid", ((cListEventItem)lvEvent.SelectedItems[0]).id); using (SqlCeDataReader sqlCeAppointmentReader = sqlCeAppointment.ExecuteReader()) { lvAppointment.Items.Clear(); while (sqlCeAppointmentReader.Read()) { lvAppointment.Items.Add(new cListAppointmentItem { id = sqlCeAppointmentReader.GetGuid(sqlCeTerminReader.GetOrdinal("appid")), Appointment = sqlCeAppointmentReader.GetDateTime(sqlCeTerminReader.GetOrdinal("appointment")), Type = sqlCeAppointmentReader.GetString(sqlCeTerminReader.GetOrdinal("type")), Done = sqlCeAppointmentReader.GetByte(sqlCeTerminReader.GetOrdinal("done")) }); } } } I can popluate the list just fine. But i want "Type" to be a combobox so the user can select the apropriate type of the appointment (its a list of appointments connected to an event). This combobox should be filled with data thats inside a table of the sql ce database (apptype). This table is not static, the users can add and delete items from this list. I have tried a few ways i found via google, but failed. I guess i'm having problems understanding how this works/should work. I hope someone can help me :( Thanks in advance

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >