FAQ Database Discussion Community


Getting textbox's value in Nested gridview

c#,.net,gridview
I have a nested gridview, And there is a textbox that named TextBoxDescription to insert user information in the second gridview. But when I want to catch textbox's (TextBoxDescription) value its return Null. Html Code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" DataKeyNames="ReportId" OnRowDataBound="GridView2_OnRowDataBound" ForeColor="#333333"> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:TemplateField> <ItemStyle...

storyboard.removeScene(“scene name”) is not working

android,gridview,lua,corona
I am new to corona sdk and trying to build sample in it. i want to get back to main screen automatically after some time by destroying my scene(i mean that scene destroys itself after some particular time and user get back to main screen).I know that for some this...

How do I get the selected row in Gridview in Javascript or JQuery

javascript,jquery,asp.net,gridview
Let me elaborate ... below is my partial gridview with a button field ... what I want is the text value of the button to use in building a url: <asp:GridView CssClass="gridUser" ID="UsersGrid" ClientIDMode="Static" runat="server" AllowPaging="true" AllowSorting="true" PageSize="5" OnPageIndexChanging="PageIndexChange" OnRowCommand="Paging" OnSorting="SortPage" OnRowCreated="RowCreated" AutoGenerateColumns="false"> <PagerSettings Mode="NextPreviousFirstLast" FirstPageImageUrl="~/Images/Navigation/firstpageIcon.png"...

Issue with hiding header of Header Grid view

android,gridview,header
I have implemented HeaderGridView using this class. Upon search filter, i have to hide header view to be re-shown at removing search filter. I have tried many approaches, but issue is, when header is hidden, height of gridview is reduced to barely 20-40dp even for 10+ rows in grid view....

Using Multiple GridViews

c#,asp.net,gridview
I'm currently working on a website and one of the pages I have a requirement to display data in different GridView. That pages looks something like <h2>First Header</h2> <p>Some text</p> <asp:GridView ID="FirstGrid" runat="server"/> ... <h2>Second Header</h2> <p>Some text</p> <asp:GridView ID="SecondGrid" runat="server"/> ... <h2>Third Header</h2> <p>Some text</p> <asp:GridView ID="ThirdGrid" runat="server"/> ......

How to set page size in GridView in yii2 [closed]

gridview,yii2
I want to set item per page in GridView in view file in a Yii2 project. I know I can set it in DataProvider instance, but I want to set in each view file separately. How can I do it?...

LinkButton is not working inside nested gridview

c#,asp.net,gridview,linkbutton
I have gridvieew named GridView1 and GridView2 inside GridView1. My problem is that, I want to place Linkbutton in GridView2, but in when I click the link button, I am getting this error. Object reference not set to an instance of an object. It seems like it could not find...

how to show edit and delete button at the right side of a gridview not at left in asp.net?

c#,asp.net,gridview
i want edit and delete button on the right side of the gridview not at left side of grid. for user friendly manipulation of gridview. how to show buttons at right side of my grid view? <asp:GridView ID="GvAllTasks" runat="server" AutoGenerateColumns="false" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true" CssClass="table table-hover table-bordered" onrowcancelingedit="GvAllTasks_RowCancelingEdit" onrowdeleting="GvAllTasks_RowDeleting" onrowediting="GvAllTasks_RowEditing" onrowupdating="GvAllTasks_RowUpdating"...

ASP.NET GridView empty on postback

asp.net,vb.net,gridview
Having an issue with an ASP.NET GridView is empty on postback that I need some help with. I think it may have something to do with the ViewState not being setup. Anyhow I originally had the code working on single user-form until I refactored code. Now to paint the picture...

Format date string programatically in DevExpress gridview vb.net

vb.net,gridview,devexpress
I have a date that is displayed like so in a gridview from DevExpress : 20071031 (YYYYMMDD*) and I would like it to appear as 2007/10/31 in the gridview. *Data was imported from sql server table as Varchar. I've tried the following but it doesn't do anything, date still appears...

Display JSON Values into labels or textbox

c#,json,winforms,gridview
I'm trying to figure out how to display JSON file directly into my labels or textboxes, this what i got so far. JSON File "players": [ { "account_id": 85000810, "name": "bb", "hero_id": 0, "team": 2 }, { "account_id": 181829645, "name": "Lobby: 0/0 Waifubot", "hero_id": 0, "team": 2 }, { "account_id":...

Can I use javascript to detect events of asp.net?

javascript,c#,jquery,asp.net,gridview
I am now trying to use gridview to create a web application for users to delete some rows from database. However, whenever I refresh the whole page, strange things happen as selectedIndexChanged was called. Is there any way that I can avoid this method being called whenever I refresh the...

Android gridview row height according to the display

android,gridview,row
and sorry for my english. A simple question (if you know the answer :-D): I have a GridView with only images, all the images are same size. I have set the numbers of colums in xml. Here is the code: <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/grid_view_bambini14" android:layout_width="fill_parent" android:layout_height="wrap_content" android:numColumns="@integer/grid_columns" <!-- grid_colums value is...

create grid view with devexpress asp.net mvc 5

asp.net-mvc,gridview,devexpress
I want to create a DevExpress grid view in an asp.net mvc 5 .But it did not display pagination, it had just the contents of the grid .How can i add the pagination to the grid? Controller : public ActionResult Index() { ViewBag.Message = "Welcome to DevExpress Extensions for ASP.NET...

Jquery script not working as expected in ASP.NET UpdatePanel

c#,jquery,asp.net,gridview
I am working on creating a nested gridview. I am using an example from: http://www.aspsnippets.com/Articles/ASPNet-Nested-GridViews-GridView-inside-GridView-with-Expand-and-Collapse-feature.aspx The problem is the "minus" of the script does not remove the nested gridview. What seems to be happen is the "plus" function seems to trigger again and again. <script type = "text/javascript"> $(document).ready(function ()...

How to show data pulled from .json in a gridview? [closed]

c#,json,gridview,windows-phone-8.1
I need help for something relatively simple, but I can't find any solution: I am using JSON.NET to pull data from here: https://yts.to/api/ , and am looking for a way to place each movie in a gridview, with a picturebox showing the poster, and the title and year underneath, like...

How to set the background of a column for specific row to different color

c#,asp.net,gridview
I am populating the GridView from code-behind. The Due Date (Format: mm-dd-yyyy) is displayed for each row entry. How can I modify the above so I can add the following: <asp:BoundField HeaderStyle-Width="1%" HeaderText="" ItemStyle-CssClass="taskTableColumn" /> (another column) between asp:TemplateField and asp:HyperLinkField where it will see if today is past the...

How to set GridView's Row

c#,asp.net,gridview,rows
I have a GridView containing Excel sheet Records. And I want to add them to my DataTable. I want to access my GridView's second row.This is a piece of my code. foreach (GridViewRow row in GridView1.Rows) { string Template = row.Cells[0].Text; string Cust_Name = row.Cells[1].Text; int Invoice_No = int.Parse(row.Cells[2].Text); }...

Getting name of table columns in gridview in addition to custom names

c#,asp.net,.net,gridview
I have a simple grid on my ASPX page and I am binding it with data coming from a select query on button click event. I am not sure how to bind columns of this table with my grid as currently I am getting 8 columns, 4 with the header...

Gridview OnItemClickListener Not Working But Why?

android,gridview,toast,onitemclicklistener,android-adapterview
I have a base adapter and gridview. I'm populating items with adapter gridview. When user touches any item, I want to show a toast. But it's never shown. @petey I update the code and i added AdapterB class for you. Please inspect. Code: @Override protected void onPostExecute(final Boolean success) {...

Custom filter for grid view not working (two associated models)

ruby-on-rails,ruby,ruby-on-rails-4,gridview,associations
I am using wice_grid and have two associated tables: Organization and User (with a 1:many relationship). For a grid view of all users I would like to include a column which states the name of the organization that the user belongs to (a variable in the organization model). To this...

BoundField double show as many decimal places as needed

asp.net,gridview,double,dataformat,boundfield
I have a double variable assigned to a boundfield in a gridview. There will only ever be a max of 5 decimal places. The boundfield is formatting the display to a scientific value. I'm assuming because it would default to a general format which gives the most compact of either...

Label convert findcontrol

c#,gridview,casting,label
I am not very experienced and perhaps I am asking a stupid question. I'm trying to delete a row inside this gridview. To do this, I call a method deleteDettagliDocument(id_row) to perform a DELETE from my DB. This method takes an integer as parameter but the control is a Label...

how to disable all rows in gridview in asp.net

c#,asp.net,gridview
I am trying to disable all rows like text-box and drop-down controls in the gridview based on some condition that i set for the gridview. I have it now where it changes the color but i also want to lock it or disable those controls how can i do that?...

Why is e.Row.DataItem null in RowCreated function of GridView

c#,jquery,asp.net,gridview
Partial HTML source for a GridView (ID: MyGrid): ... <tr title="Task is Past Due" style="color:#C00000;background-color:#EBE9E9;"> <td> <input type="image" name="ctl00$ContentMain$yourTasksGV$ctl04$btnShowDepend" id="btnShowDepend" title="Click to view Dependencies" class="gvTaskDep btnShowDepend" src="es.png" alt="" /> <div id="pnlSubTasks" class="pnlSubTasks"> <div> </div> </div> </td> <td style="background-color:DarkRed;"> </td> <td...

How to show unique key exception before saving into database?

c#,asp.net,gridview,drop-down-menu
I've created a gridview in which user can enter items and their quantities. The number of items are unknown so the requirement was that to able to add as much items the users want to. So I've given a provision to add item row for another entry. All these data...

Sort File Creationtime in gridview

vb.net,gridview,file-io
i have a gridview that retrieve a list of name and file creationdatetime from servermappath and try to sort by creationtime by this Function GetTable() As DataTable Dim filePaths() As String = getFiles(Server.MapPath("~/path/"), "*" + Session("Uauthen") + "*", SearchOption.AllDirectories) Dim tb As New DataTable() tb.Columns.Add("FileName") tb.Columns.Add("FileCreationTime") Dim dv As New...

How to limit the checkbox selection both columnwise and rowwise in gridview in javascript

javascript,jquery,gridview
I am having an grid view with check box that have 5 row and 6 column.what is my requirement is i can select row wise 3 check box and in the whole grid i can select totally 6 check box at an time.I have tried these below code but Its...

how to display binded items in gridview for one to many relation table

c#,list,gridview,checkbox,devexpress
I binded Devexpress gridcontrol, from a list which fetches data from one to many relationed table. I mean, I have one "nID" for many "analiseID"s. Gridview displays records one under the other like this: nID Analises 2 A 2 C 2 D 3 A 3 C ... I need gridview...

How to create dynamic table 4 columns per row using GridView?

c#,css,asp.net,twitter-bootstrap,gridview
Hello I'm new to c# and bootstrap, I want to style my table like on the picture below using gridview and make it responsive, and I don't know how to implement it. aspx code: <div class="table-responsive"> <asp:GridView runat="Server" id="data" CssClass="table table-hover table-bordered"/> </div> css code: .table-responsive{ margin: 20px; } But...

Yii2 - Kartik Grid Extension Error

php,gridview,yii2
I have made many attempts to install Kartik Grid Extension, but all of them failed due to this error: Setting unknown property: yii\bootstrap\ButtonDropdown::containerOptions The error is located in /Applications/MAMP/htdocs/business/vendor/yiisoft/yii2/base/Component.php at line 197 My view as the code: use kartik\grid\GridView; <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [...

Export multiple gridviews to multiple excel tabs (sheets)

c#,asp.net,excel,gridview
I have 6 gridviews in my website that I need to export to excel, but each one in one different sheet. This link Export GridView to multiple Excel sheet uses something quite similar, but he is using datasets and I am not. I am new to C#, so I couldnt...

Using the FooTable plugin with the ASP.NET DataGrid

asp.net,vb.net,gridview,datagrid,footable
I am currently redesigning an application for the company I work for. All the data is displayed through a DataGrid, which is fine, except for when I try to incorporate a JQuery library called "Footable" to make all the grids collapse when on a smaller device as explained here. In...

ImageView inside Gridview repeating image when scrolling (using ImageDownloader)

android,gridview,imageview,repeat
As the title says, I have this problem. Because I need to retrieve images from the network, I have implemented a solution which is explained here I will post the Adapter and ImageDownloader code (I have taken the liberty to modify the downloader in order to make the functionality more...

Gridview row.Cells[i].Findcontrol finding control in wrong Cell

c#,asp.net,gridview,asp.net-2.0
I have a function I've written that you pass in the gridview row, as well as what control type you're attempting to locate. It finds the control as intended, however, it finds it in the incorrect cell. protected int GetCell(GridViewRow row, string strSection) { int intVal = 0; for (int...

Load Images from Phone storage to GridView using Picasso

android,gridview,picasso
I have downloaded the images in a folder on my phone and I also have the path to those images. How can I load all the images from that folder in a gridView using Picasso library? UPDATE: GridView gridView = (GridView)findViewById(R.id.gridView); File file = new File(Environment.getExternalStorageDirectory().getPath() +"/Gallery/Mix/"); Uri uri =...

Adding contents of a DataViewGrid to access - VB

vb.net,gridview,datagridview
I've got quite the frustrating issue! My VB code below is intended to transfer the records in a DataGridView to an Access database. Let's say, for example, the gridview has three records Name|House|Age John|L|1 Rick|B|12 Fred|A|20 The 'name|house|age' is the header of the GridView, whilst the three records make up...

Dynamically change the number of columns of a GridLayoutManager

android,gridview,android-adapter,android-gridlayout
I am actually using a GridLayoutManager with two columns in my app and I would like to have one column depending on the view type used. Here is the code I have in the method "onCreateView()" of my fragment : // Recycler view for users usersList = (RecyclerView) mView.findViewById(R.id.usersList); //...

How to set size of colour in grid view and change it's shape to round

java,android,gridview,view,android-arrayadapter
package com.example.dhavalpatel.atira; import android.content.Intent; import android.graphics.Color; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.GridLayout; import android.widget.GridView; import android.widget.TableLayout; import android.widget.Toast; public class second extends ActionBarActivity...

Android getItem int GridView

android,gridview
I have a custom GridView populated by array of colors. Now when I click the item I want to get the color of cell and pass it. I have this code, but when I click the item, get the result (zero) public class Colori_picker extends Activity { private GridView grColori;...

Bind grid view data from existing code, current date

c#,asp.net,gridview
I want to using the code below and display in GridView. The situation is, when user click on GET CURRENT DATE TRANS, GridView will display the today date as the result. I already insert the GridView id as GridView1 string connetionString = null; SqlConnection connection; SqlCommand command; string sql =...

link coming twice while exporting to pdf using itextsharp

pdf,gridview,itext
my asp boundfield: <asp:BoundField DataField = "SiteUrl" HtmlEncode="false" HeaderText = "Team Site URL" SortExpression = "SiteUrl" ></asp:BoundField> My itextsharpcode for (int i = 0; i < dtUIExport.Rows.Count; i++) { for (int j = 0; j < dtUIExport.Columns.Count; j++) { if (j == 1) { continue; } string cellText = Server.HtmlDecode(dtUIExport.Rows[i][j].ToString());...

ImageView setBackgroundRessource not update even with inflate

android,gridview,view,timer,adapter
I'm trying to update an imageView from a gridview with a border, for doing this I have this xml file which works : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <solid android:color="#158CDB" /> </shape> </item> <item android:left="3dp" android:right="3dp" android:top="3dp" android:bottom="3dp"> <shape android:shape="rectangle"> <solid android:color="#FFFFFF" /> </shape>...

How to get value from dataGridView which is imported from .xls file

asp.net,vb.net,gridview,datagridview
I have an application that allow me to import .xls/.xlsx file into a gridView. The .xls/.xlsx file is successfully imported into a gridView. There are a columns named Date, Name and Total in my gridView. How can I get the value from that dataGridView? I want to get all the...

Clear all selected items in a gridview

java,android,gridview,arraylist,expandablelistview
I have a gridview inside a ExpandableListView with CHOICE_MODE_MULTIPLE, I'm trying to deselect all items when I press a button, but the way I'm doing it it is only unselecting the last item, how can I clear all of them? @Override public int getCount() { return child.size(); } @Override public...

Add custom image to grid cell that is a RepositoryItemButtonEdit devexpress button

gridview,devexpress
I am trying to add a custom image to a grid cell that is a RepositoryItemButtonEdit devexpress button. When I execute the following code, I see nothing on the button. Dim image As System.Drawing.Image = System.Drawing.Image.FromFile("C:\carl\addAccount.png") Dim buttonAdd As New RepositoryItemButtonEdit buttonAdd.TextEditStyle = TextEditStyles.HideTextEditor buttonAdd.Buttons(0).Kind = ButtonPredefines.Ellipsis buttonAdd.Buttons(0).Image = image...

Change the fore color of gridview row base on row text

c#,asp.net,gridview,rows
There is a row with "Correct" text in my database. However the if condition is never true. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblremark = (Label)e.Row.FindControl("lblremark"); if (lblremark.Text == "Correct") { e.Row.ForeColor = System.Drawing.Color.Black; e.Row.BackColor = System.Drawing.Color.Cyan; } else { e.Row.ForeColor = System.Drawing.Color.Black;...

Yii2 GridView pagination with only next and prev links and no TotalCount

php,gridview,pagination,yii2
There is a huge DB table with millions of rows and it needs to be outputed in a GridView with only prev and next links in the paginator. I don't want to use 'select count(*)' on such tables, so there's no TotalCount. Also I want to prevent users from setting...

Android Images in a gridView in wrong order

android,arrays,gridview,random,imageview
i have a problem with a image gridView. I put all the images in an array, but when the grid is displayed the images aren’t in the order that I decided. Here is my code taken from various tutorials. The main activity: <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:text="Clicca sull'immagine per ingrandire"...

How to Populate Yes/No Checkbox List Using Values from GridView?

c#,asp.net,gridview,checkbox
I have a checkbox list in a grid view edit popup with yes and no choices. I am attempting to populate the checkboxlist with data from the database in the form of "Yes" and "No" strings. How can I select Yes or No on the checkbox list so the user...

Attatch Gridview to email body VB.NET

asp.net,vb.net,email,gridview
I am currently sending emails programatically in my web page, the emails work fine but i would also like to attach a gridview into the email body. this is my VB code I have for sending the email so far... Dim Uname As String = Page.User.Identity.Name.Substring(Page.User.Identity.Name.IndexOf("\") + 1) strFm =...

Find textbox value in 2 nested gridviews

asp.net,gridview,textbox
I have a gridview2 which is inside gridview1. gridview 2 has a textbox which i need to get the value of that text box. Usually I do like this when I need to get the value from a textbox when it's inside a single gridview: TextBox txb = (TextBox)GridView1.SelectedRow.FindControl("TextBox1"); I...

Display delete button in gridview in gridview base on condition

asp.net,gridview
I need to display delete button based on some conditions. ASPX: <asp:TemplateField> <ItemTemplate> <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" ImageUrl="~/Images/Delete.gif" Visible="false" /> </ItemTemplate> </asp:TemplateField> CODE BEHIND: protected void gvL3App_RowDataBound(object sender, GridViewRowEventArgs e) { DataTable dtInactiveCodes = DataRepository.getInactiveCodes(); string[] strInactive = dtInactiveCodes.AsEnumerable() .Select(row =>...

How to Display GridView Rows in Popup Within a Method that Already has Parameters?

c#,asp.net,gridview
I am trying to display gridview rows in a popup within a method that already has parameters. I am passing a hidden ID field into the LoadAttorneyPopup method and then I want to execute the PopulateAttorneyPopup method, but when I add parameters to identify the GridView what do I have...

Linearlayout into cell of gridview

java,android,gridview,android-linearlayout
I have got a problem with programmatically created LinearLayout contains into design time created GridView. public class page2 extends Fragment { public View rootView; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(R.layout.page2, container, false); String [] rings= { "1 пара", "8.30 - 10.05", "8.30 - 9.15...

Update MySQL using HyperLink ASP.NET

c#,mysql,asp.net,gridview,hyperlink
I store all data in MySQL and display it's some colums in gridview. Gridview's delete button works fine. I would like to edit datas so created HyperLink. it navigates another url and gets values from MySQL DB and sets textboxes, textareas. Everything is fine until this time but I try...

Error while trying to start media player: start called in state error (-38, 0)

android,gridview,media-player
I have a GridView with your positions and I do case on the onCreate, So, case position = 1 play audio1, case position = 2 play audio2 But when I execute, diplay a error and stop play sounds. start called in state error (-38, 0) The Activity: public class HomeEnglishFoodsActivity...

Get MediaStore path of a Specific Folder

android,gridview,mediastore,ion
I'm creating an update for my application, in it I have a folder with saved images that I would like to display in a GridView. I am already using the Ion library. The creator of the library (Koush Dutta) already has a sample doing what I want and displays all...

Yii2 GridView - Generate filtered or sorted URL

php,gridview,yii2,crud
I use gii generate the CRUD page of Product, I can access the the list by index.php?r=product and in code, the url is ['/product']. Now I want to access the product index page with filtered parameter and sorted parameter? Is there any tool or standard way to achieve these? For...

Multiple DataKeyNames not filtering sqldatasource

asp.net,gridview,sqldatasource
I have two grid-views on a page both bound to an sqldatasource. The first gridview (GVMonthReport) displays data from a table My goal is to select a row from GVMonthReport to filter three items (Location, Trans_Budget_Code, Transaction Date) in the other table(GridView2) sqldatasource. The problem is as following: I...

ASP.NET ObjectDataSource exception on pagination event

c#,asp.net,gridview,pagination,objectdatasource
ASP.Net is throwing this error when paginating a gridView. It loads the first chunk of elements fine, but fails when clicking on any page number. I have a similar Page implementing ViewAllEvents which has no parameters and runs fine. So I guess it has to do with the parameter adding...

Adding image to GridView created in CodeBehind

c#,asp.net,gridview,datatable
First thing I do is create a Datatable and then bind it to a GridView Here is my code DataTable dt = new DataTable(); DataColumn imgC = dt.Columns.Add("img", typeof(string)); DataRow row1 = dt.NewRow(); row1["img"] = "~images/foo.png"; GridView gv = new GridView(); gv.DataSource = dt; gv.DataBind(); cust_services.Controls.Add(gv); I'm not sure where...

GridView children should stretch out to fill their GridView parent

android,gridview
I use a GridView in order to add 9 ImageButtons that work as a menu in a screen. The ImageButtons have fixed dimensions. The problem is that these buttons do not stretch out to fill their GridView parent. I want them stretched out in order to fill the remaining space....

Getting selectedrow in RowCommand

c#,asp.net,gridview,buttonfield
i have a gridview as: <asp:GridView ID="gdvOpinions" runat="server" Width="100%" CellPadding="4" ForeColor="#333333" GridLines="None" Height="100px" Visible="False" AutoGenerateColumns="False" onrowcommand="gdvOpinions_RowCommand" > <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:ButtonField ButtonType="Button" CommandName="Confirm" Text="تائید" /> <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="حذف" /> <asp:BoundField DataField="ID"...

How to see text in toast

android,gridview,toast,android-toast
I'm trying to see text from GridView using a toast when I selected or clicked on GridView's data. I can see position, but don't know what to put to see a text. Here is a code. import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.GridView; import android.widget.Toast;...

How to add a checkbox to a GridView and select/deselect based on a SQL table row value

c#,html,asp.net,gridview,datatable
<asp:GridView ShowHeaderWhenEmpty="false" ID="gvSubTasks" runat="server" AutoGenerateColumns="false" ClientIDMode="Static"> <Columns> <asp:BoundField DataField="SN" HeaderText="SN" /> <asp:BoundField DataField="ST" HeaderText="ST" /> <%-- ADD ANOTHER COLUMN HERE WITH THE CHECKBOX --%> </Columns> </asp:GridView> code-behind: string strST = @"SELECT ,A345 'SN' ,M3w 'ST' ,A667 'CT' -- 0 for not complete and 1 for complete FROM [mydb].[dbo].[table1]"; public DataTable...

Gridview is not displaying while i run my code

c#,asp.net,gridview
I want to display three column field as dropdownlist and other in textbox format.I have wrote the code to display the dropdownlist value from my database but its not working.I have attached my code for your referal <asp:GridView ID="Gv1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateField HeaderText="FacultyName"> <ItemTemplate> <asp:Label ID="lblfaculty" runat="server" Text='<%%# Eval("facultyname")...

How can i access fragment layout in parent activity?

java,android,android-fragments,gridview,baseadapter
I have got a tabpager and fragments. And a frament has got a "GridView". I am using a basedapter innerclass in the fragment parent activity. But when i want to set adapter to my gridview i m getting nullpointerexception. Because GridView variable is always null.how can solve this issue? Fragment...

how to add a line number row, and sort by it

asp.net,.net,vb.net,sorting,gridview
I have a Grid-view to which I recently added a new column for rowNo <asp:TemplateField HeaderText="RowNo" ItemStyle-HorizontalAlign="left"> <ItemTemplate> <asp:Literal ID="lblRowNo" runat="Server"></asp:Literal> </ItemTemplate> </asp:TemplateField> The rowNo should allow sorting functionality, just as the other columns do. I added a property to my Order object: 'RowNo Public rowNoVal As Integer Public Property...

Binding datatable values into a checkbox that's placed inside GridView

asp.net,gridview,datatable
I am binding a datatable to a GridView which has a checkbox in one of its fields. I have trouble getting the checkbox to be checked according to the datatable. This is what I have thus far: <asp:TemplateField HeaderText="Approved" SortExpression="Approved"> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("Approved").ToString() == "Y" ? true...

Button click to change text in focused textbox that was dynamically generated

javascript,asp.net,vb.net,gridview
Using VS2013 I'm creating a website to collect some data on a tablet (using IE). I don't want to use the tablet keyboard so I created a numberpad out of asp buttons instead. I need to know which textbox had focus in order to change the text to the value...

How to convert and show cell/label value from int to string

c#,asp.net,gridview,logic
I have ASP.NET project. It has GridView which is populated from my db. In the db i have column named Role and its type is integer. In DataGrid my column is TemplateField. How i can show on Admin or Guest instead of 1 or 2 ?...

Cant find code to insert into AS access database using c#

c#,asp.net,gridview,oledb
I am very new to this. I have a MS access database (.mdb having only two columns) and i have linked it using a gridview. It displays whatever is there in the database on the webpage. I also have an post button for a text box (like the one in...

Bootbox confirm: return client result in order to do postback to rowCommand

javascript,c#,asp.net,gridview,bootbox
Before bootbox, I did this on aspx file in gridview; <asp:Button ID="btnDelete" CssClass="btn btn-danger" OnClientClick="if(!confirmDelete()) return false;" runat="server" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" CausesValidation="false" CommandName="DeleteRow" Text="Delete"/> and on js file; function confirmDelete() { return confirm("Are you sure you want to delete the record?"); } And with confirmation, the gridview's RowCommand is...

Error deleting from GridView

c#,sql,asp.net,gridview
In my GridView I have a list of employees. When I click the delete link I'm calling a stored procedure that deletes information from two tables. The first table works fine regardless. The second table works fine as well, however, if there were originally more than 4 rows of data...

Blank screen on GridView

android,arrays,gridview
I'm trying to create a GridView with an array of strings. These are XML, and MainActivity and Adapter, but what I get is a blank screen. I'm change the background, but the result is the same, but clicking on a point on the screen appears to me the toast stating...

convert list to table and bind to gridview

asp.net,vb.net,gridview
I have a listitem that have a field contain Name and creation date Dim files As List(Of ListItem) = New List(Of ListItem) For Each filePath As String In filePaths files.Add(New ListItem(Path.GetFileName(filePath), filePath)) files.Add(New ListItem(File.GetCreationTime(filePath), filePath)) Next GridView2.DataSource = files GridView2.DataBind() bind to boundfield <asp:BoundField DataField="Text" HeaderText="Report Name" /> first files.add...

Yii2: Passing index page to breadcrumbs in view and update actions

gridview,yii2,breadcrumbs,yii2-advanced-app
1) Have several pages of results in index (GridView) with default LinkPager settings. 2) Invoke either update or view actions in ActionColumn. 3) Do whatever, then click breadcrumbs to return to the same page in GridView you came from, but it does not: You're back at page 1 which in...

How to avoid parent view/viewgroup animation for click events in GridView's cell

android,gridview,android-gridview,android-gridlayout
I am using a TextView inside a LinearLayout for GridView's cell. The TextView is supposed to animate(like button) in pressed state, for which I am using drawable property. Everything is fine apart from the fact that the rectangular Grid cell gets little darken even outside circle, which i wasn't expecting....

How to compare the column with textbox in gridview

asp.net,gridview
I wish to ask, how could I compare my "Quantity to Redeem" and "Quantity Available" when I key in value in textbox? Example, in My gridview,I key in "2" in textbox, but the available quantity only "1".So I wish to display error shows that quantity not enough. My validation only...

Control 'testGridview' of type 'SPGridView' must be placed inside a form tag with runat=server

c#,gridview,itext,export-to-pdf,spgridview
I have a spgridview and want to export its content to pdf. I am using itextsharp for the same. But error is encountered at rendercontrol call. I have already tried the solutions mentioned in the below thread. Question Also I have tried using public override void VerifyRenderingInServerForm(Control control) { return;...

How to use data binding in select parameter of sqlDataSource?

c#,asp.net,gridview,data-binding
I have a sqlDataSource in which I use select parameter as below : <asp:sqlDataSource ID="EmployeeDetailsSqlDataSource" SelectCommand="SELECT EmployeeID, LastName, FirstName FROM Employees WHERE EmployeeID = @EmpID" ConnectionString="<%$ ConnectionStrings:NorthwindConnection %>" RunAt="server"> <SelectParameters> <asp:Parameter Name="EmpID" Type="Int32" DefaultValue="<%#userid%>" /> </SelectParameters> </asp:sqlDataSource> In my backend code, I have assigned a value to userId and also...

Display records from another table in an existing GridView

c#,sql,asp.net,gridview
Here is an example of the problem I am facing. I have a table called Issues, which has the initial record information. Each record also has a category and some have multiple categories. Issues ID | Name | Comments | Date | SubmittedBy 1 | Server down | Need assistance...

C# infinite loop when sorting GridView

c#,asp.net,gridview,gridview-sorting
I want to sort my GridView in the CodeBehind but my sorting methode give me an infinite loop. My GridView, for testing, look like: <asp:GridView ID="GVEquipe" OnRowDataBound="GVEquipe_RowDataBound" OnSorting="GridView_Sorting" AllowSorting="true" AutoGenerateColumns="False" DataKeyNames="Employee" runat="server"> <Columns> <asp:HyperLinkField DataTextField="Employee" DataNavigateUrlFields="Employee" DataNavigateUrlFormatString="~/Profil.aspx?No_Emp={0}" HeaderText="No d'employé" SortExpression="Employee" />...

Grid view to display date format in MM-DD-YYYY format

c#,sql,asp.net,sql-server,gridview
I have a gridview to display date on button click depending on the checkbox(s) selected. I have used string concatenation to fetch data to manage dynamic changes at the UI. Currently, it displays in this format - MM-DD-YYYY 12:00:00 AM, by default but I need it in MM-DD-YYYY format. With...

ASP.Net GridView DropDownList not posting back with updated data

asp.net,vb.net,gridview
I have a GridView that contains DropDownLists. They function as expected except during page postback. When the user clicks the update button on the page, I have a sub that loops through the grid rows, performs business ops and saves the data. The problem is that during postback, the DropDownLists'...

Deserializing Json data to c# for use in GridView - Error Data source is an invalid type

c#,json,gridview,serialization,.net-4.5
I am relatively new to working with C# (v5.0) and Json data (Newtonsoft.Json v6.0) and am seeking assistance in resolving an error when attempting to populate a .Net 4.5 GridView control. My sample Json data as returned by a web service is: { PersonDetails: [ { Book: "10 ", FirstName:...

CSS: How to add classes to existing grid that allow skipping columns on the left side

css,gridview,grid,col
I am trying to set up a simple column grid without the use of a library. So far I have the below which works as intended (at least good enough for me to learn). What I couldn't figure out is how I can set a class style to skip a...

Yii2: Change Gridviews' DataProvider on button click

javascript,php,gridview,yii2,pjax
I have 3 seperate dataProviders for my Gridview, one with Saved data, one with Unsaved data and one with both. Now this is what I'm trying to accomplish: If you click on saved, the dataProvider changes to the one with saved data. I'm trying it like this: <?php if($i ==...

Unable to update changes to database after editing the gridview. There are no errors thrown, but changes are not updated in table in database

c#,asp.net,gridview
web config <add name="MyConnection" connectionString="Data Source=HABIBDEA-PC;Initial Catalog=kopma;Persist Security Info=True;User ID=sa;Password=ilovedea1" /> <add name="kopmaConnectionString" connectionString="Data Source=HABIBDEA-PC;Initial Catalog=kopma;User ID=sa;Password=ilovedea1" providerName="System.Data.SqlClient" /> <add name="kopmaConnectionString2" connectionString="Data Source=HABIBDEA-PC;Initial Catalog=kopma;Persist Security Info=True;User ID=sa;Password=ilovedea1"...

How to change background of non-visible buttons in GridView (Button adapter) from an activity

java,android,gridview,baseadapter
My code works only for visible views. mGridView = (GridView) findViewById(R.id.gridView); mGridView.setAdapter(new ButtonAdapter(this, list)); Method called when chronometer ticks: public void setBackground(int i) { Button button = (Button) mGridView.getChildAt(i); button.setBackgroundResource(R.drawable.button_shape); This method causes NPE because getChildAt cannot access non-visible childs. I tried some solutions found here but no luck so...

how to handle Gridview Click in ViewPager?

android,gridview,android-viewpager
I m create gridview in my FragmentA class and when i click gridview position say 0 then its navigate to FragmentB class and again when i clicked position 1 then its navigate to FragmentC class But my problem is that when we come back in my FragmentA class then my...

nothing happened when i click download button in gridview asp.net

c#,asp.net,gridview
i try to download file on my database in gridview, but nothing happened when i click download link.. this my aspx.code <asp:GridView CssClass="table table-striped responsive" ID="GridView1" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="NoSurat" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDeleting="GridView1_RowDeleting" OnSorting="GridView1_Sorting" PageSize="5"> <Columns> <asp:TemplateField HeaderText="No Surat"> <ItemTemplate> <asp:Label...

Shorter code so fill arrays with same Value

java,android,arrays,image,gridview
For my "memory" game, I'm using a GridView to display 12 cards. At the beginning, the cards are all the same. In all the examples I found, you see something similar to this code to add the picture ids to your ImageAdapter: private Integer[] mThumbIds = { R.drawable.card_back, R.drawable.card_back, R.drawable.card_back,...

Formatting dynamically created column

c#,asp.net,gridview
I have a asp grid contents generated dynamically using a sql procedure. using the procedure datatable returned is binded to the grid. In this grid i have a cost column which I like to round to 4 decimal places(12.1234). How to do the same? I tried in RowDataBound as if...

in an asp.net gridview, should autogeneratecolumns=true ignore datakeys?

asp.net,gridview,autogeneratecolumn
My question is two-fold: firstly, is it a mistake by Microsoft that when the autogeneratecolumns=true attribute of an asp.net gridview is set, columns are generated even for fields listed in the datakeynames attribute? Surely that is contrary to the whole rationale for datakeys? Secondly, is there a way to use...

remove attribute in json that contain multivalue in asp.net c# before show it in gridview

c#,asp.net,json,gridview,multivalue
I'm newbie in asp.net c# . Iwant to show the json data into table with gridview .I have json data with this format : [{ "reviewerID": "A1YS9MDZP93857", "asin": "0006428320", "reviewerName": "John Taylor", "helpful": [ 0, 0 ], "reviewText": "last movement of sonata #6 is missing. What should one expect?", "overall":...

Create ASP.NET GridView automatically with database

c#,asp.net,gridview
I want to make a general Gridview and then I've got some SQL tables which I want to fill in. The columns and rows should be automatically generated if there are more. I will use C# to do that. But how do I do it if I want to generate...

Bind a Dropdown in Gridview When Selected Index Changes on Dropdown in the same Gridview

c#,asp.net,gridview,drop-down-menu
I have a gridview with template fields consisting of dropdowns and textboxes. 1 dropdown will be a so-called "master" dropdown that when the selected index changes, other dropdowns in the same row will be databinded using the selected value of the master dropdown. I have this code for my ASPX...

Telerik WinUI GridView uses formating for wrong cell if scrolled

c#,winforms,gridview,telerik-grid
I used the Grid in the Telerik samples for WinUI C:\Program Files (x86)\Telerik\UI for WinForms Q1 2015\Examples\QuickStart\GridView\Rows\AddNewRow\Form1.cs and added the following code to get the UnitPrice in a blue font: public Form1() { ... this.radGridView1.CellFormatting += new CellFormattingEventHandler(radGridView1_CellFormatting); } void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { GridDataCellElement dataCell = e.CellElement as...