Questions tagged [gridview]

0

votes
1

answer
34

Views

Xamarin Visual Studio 2017 Gridview with images and textview

I'm trying to populate a gridview with images and text. First I got the code to work with just the images (12 images). That image adapter code is: class ImageAdapter : BaseAdapter { public DataSet participants; public User MyUser; private readonly Context context; public ImageAdapter(Context c) {...
Prescott Chartier
1

votes
1

answer
11.7k

Views

How can i get gridview row count

I am trying to get gvProducts row count. I have tried the below code but it give insufficient result. protected void gvProducts_RowCommand(object sender, GridViewCommandEventArgs e) { string commandName = e.CommandName.ToString().Trim(); GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource)....
ayman
1

votes
1

answer
2.1k

Views

how to create search field in gridview without using search model

I have created sqlDataProvider in my controller and its working. My problem is i dont know how to provide search field since im not using the search model. this is code in my controller public function actionAnalisa() { $sql = "SELECT tbl_permohonan.permohonan_id As permohonan_id, user.id As id,...
NoBody
1

votes
1

answer
11k

Views

Remove Gridview row in rowDataBound event asp.net c#

I have a gridview which checks some values on rowDataBound event.I want to remove some rows based on conditions checked in rowDataBound.I tried putting all controls in a Panel and hiding that panel ie, TRY 1 : protected void grdFeatured_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row...
sajanyamaha
1

votes
0

answer
8

Views

Empty data text shown on page changing event

I have created a gridview and binded it I have also given the pageindexchanging event but empty data text appears on next page though there is data in database. protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { BindGrid(); } } protected void BindGrid() { SqlConnection con = ne...
pranay brahmbhatt
0

votes
0

answer
10

Views

GridView nested inside RecyclerView not wrapping height and showing only single row

I tried wrapping content at various places in my code but that shows only single record inside gridview.In the image shown below there should be 4 rows but gridview is showing only one row. If i change height in row_work_report.xml to match_parent only then more records are visible. Please help as i...
Guneet Kaur
0

votes
1

answer
19

Views

How to add currency symbol without rounding value on asp.net page

I have DiscountTotal variable with decimal type. Values are set on code behind the page, after page is loaded the values are rounded. Value 7610.3250D is being displayed as £7610.33. I like this to be displayed as £7610.32 or $7610.32 depending on logged in user.
user1263981
1

votes
1

answer
190

Views

Cumulative/Running Total in Yii2 gridview

I am trying to achieve running total in yii2 grid view. I have tried below but I can't quite get the expected result. The data is from an active dataprovider. $runningtotal = 0; echo GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'pjax' => true, 'columns' => [ [...
zeddarn
1

votes
1

answer
2.4k

Views

Get gridview row values when checkbox checked

I have a gridview with checkboxes to select the row. On checking the checkbox I need to get the row values into a string/session. Below is the code There is a button below the grid. on click of the button I need to get the values. protected void LinkButton1_Click(object sender, EventArgs e) { foreac...
user3660473
1

votes
4

answer
6.2k

Views

GridView and Html Encoding

I've recently upgraded a client's web site to .NET 4 and we've found out during the process that now GridView column values are automatically HTML encoded. They have wide use of HTML strings in their code so we must turn that off. I know one solution would go over each column and add HtmlEncode="fa...
Shay Friedman
1

votes
3

answer
8.2k

Views

How to use Substring in Bind text

I am binding a Gridview with some data and I have taken labels in template field and I am binding the data to that label's text property, I want the length of the Bound text till 10 characters how to achieve this
Anuj
1

votes
2

answer
8.8k

Views

Remove Row from GridView

I have a grid view on my page and I want to allow the user to add / remove items to it. How it works, and the add functionality does work albeit probably not great, is that a user selects a product from a drop down list, then clicks Add. This creates a new row in grid with the select Product text...
MattR
1

votes
3

answer
1.8k

Views

How to assign value inside the item template lable in asp.net?

Codebehind, I am getting below error Object reference not set to an instance of an object. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { string a = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "item_id")) ; str...
Sangeetha
1

votes
2

answer
4.8k

Views

Add text from c# code to a gridview label

I need to add an specific text in an itemtemplate on a gridview... right now I have this in my gridview in the part where it says I made an specific text, but it will always be the same text (well except in the Eval of course)... But I need to get the format I need from this method. public static st...
Victor
1

votes
3

answer
4.8k

Views

LinkButton's not firing GridView_RowCommand

I have a LinkButton inside a GridView that passes a CommandArgument and tries to fire RowCommand GridView declaration: LinkButton inside the GridView: Code behind: protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "DeleteChecklist") { string refID...
dythe
1

votes
4

answer
31.1k

Views

Select a cell value from GridView asp.net c#

I have a GridView with users and I want to be able to select the first column of a row - which is with usernames. I know how to do it with the autogenerateselectbutton property, but it doesn't look well on my design. So instead, I want to make it without the Select button. Here is what I have so far...
Apostrofix
1

votes
2

answer
9.9k

Views

How to add Hyperlink dynamically to GridView Row in asp.net

I have a GirdView populated with text from code behind, I want to have a row contains a text and another row contains a HyperLink . I use the following code : Dim dtFull As New DataTable() ' Create four typed columns in the DataTable. dtFull.Columns.Add("Self Assessment", GetType(Object)) dtFull.Co...
Adham
1

votes
1

answer
1.6k

Views

Making an ASP.Net command button invisible or hidden with code-behind coding

We have a command button on an ASP.Net web form with a GridView that the user sends the data displayed in the GridView as an email. On this GridView is a "Select" command button that we would like to temporaraly remove from the GridView when the user clicks on an Image Button and have the button app...
Emad-ud-deen
1

votes
1

answer
458

Views

Windows RT: Snapped mode Change GridView to ListView

When my app is snapped displaying a GridView isn't the best way to present the information. I want to present it in a ListView instead. I also want to change the item template as well. I currently have a UserControl that accepts the DataContext as the item template so I can simply create a new view...
Jeremy Edwards
1

votes
1

answer
4.3k

Views

Android Gridview show blue background, how to change the background to white?

when i start my apps gridview show blue background i want to set white background how to set here i put my xml and imge Gridview.xml
Mahesh
1

votes
3

answer
1.7k

Views

What's the name of the grid-like layout used in Google+ apps?

I am thinking to build an app which will have the same grid layout like in the picture, but I cant figure out what layout I should use. GridView, or something like that?
Silvio Marijic
1

votes
1

answer
1.5k

Views

Edit Row In the Second Page of Gridview

I am having a problem in my gridview, my Gridview has a event of OnPageIndexChanging, the pagesize of my gridview is 20 once the record was reach 20 in the first page, the 21st-40th record will go to the second page, when I go to the second page, and I click the edit button in my gridview.. ex: I cl...
portgas d ace
1

votes
2

answer
6.6k

Views

dev express grid view combo box default value when binding value is null / empty

The following is the combobox code that im using in the dev express grid view edit template. I want the combobox display nothing at all or a string that says "Please Choose and Employee" while adding a new employee and not when its editing. @Html.DevExpress().ComboBox(edtSettings => { edtSettings.Wi...
Sindhoor
1

votes
2

answer
226

Views

Does setting DataKeyNames property make sense when dynamically binding data?

I am new to asp.net and want to know that does setting DataKeyNames property make sense when dynamically binding data? I have bind data using following code gvCategory.DataSource = objCategoryInfo; gvCategory.DataBind(); here gvCategory is my gridview that I created at designview and objCategoryInfo...
CodeWarrior
1

votes
4

answer
2.9k

Views

Display Local Time in GridView

I have an asp.net gridview bound to the following sql server 2008r2 data source: In my Fault table there is a column called DateTime of type datetime. The values stored in this column are in UTC format and I need them to be displayed in the local timezone for the browser I have added a template fie...
Rob Bowman
1

votes
2

answer
228

Views

Sharing styles between several GridView controls

I need to style several GridView throughout my application with the same visual styles. This style includes customizing the ItemsPanel property as well as the GroupStyle property. My problem is that the GroupStyle property of GridView is not a dependency property. So the code I would have liked to w...
Mic
1

votes
2

answer
5.8k

Views

find controls from emptydatatemplate in gridview

i am using EmptyDataTemplate for entering new data in grid while there is no existing data,but i am not able to find my controls in the EmptyDateTemplate protected void gvNavigationDtls_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("EInsert")) { GridViewRow emptyro...
Anuj
1

votes
2

answer
1.3k

Views

capture multiple values from grid view to pass to a stored procedure

asp.net and C# here I have the columns from a gridview control when the user clicks either button i need to pass the values for CaseID, CaseworkerID, EventDate and Code to a stored procedure but how do i pass multiple parameters to my onclick method ???? EDIT: so I now have this thats a good start
Sonny123
1

votes
2

answer
753

Views

Group contents in GridView

I have some n no of rows in my GridView. Those items are categorized into some categories. For example first 10 rows are categorized into a category and second 7 rows are categorized into second category. There is a column named category in the Binding DataTable. Basing on that column the gridview h...
Ramu
1

votes
4

answer
11.6k

Views

Group/merge multiple records as one gridview row

I would like to know how to make multiple records into a single gridview row. Take a look at the following example. Data Source: FAMILY GROUP COLOR Dog Poodle Blue Dog German Shepherd Red Dog Pitubll orange Cat Ev...
sQuijeW
1

votes
1

answer
920

Views

python tkinter button events

I have written the following code to list all directories/files in a given path and then write them to a button. How can I use tkinter's events handler so that whenever any button is double clicked within the widget window it calls a new function. def display_toplevel(globpath): global row, column d...
bigl
1

votes
1

answer
2k

Views

I want to highlight a specific word inside a gridview in asp.net C#

I have a GridView that showing a lot of texts I want to highlight a specific word while I navigates between the text, I want to highlight it always I mean not from after a search or something, let's assume that I have the following text inside the gridview"I would have an apple in the morning, an ap...
MRK
1

votes
1

answer
428

Views

ASP.Net Gridview Setting the BackColor of a Separator Row

I am constructing a Gridview that will look like a paper based form to enable Test Results to be entered into a system. On the form there are separator rows between rows 8 & 9, 16 & 17 & 24 & 25. I have used the block of code reproduced below to insert the row and that is working fine in respect of...
Neil
1

votes
1

answer
838

Views

GridView Stretching ImageView Non-Uniformly

I have a GridView that I am using to display a row of 4 images, each image is 200 x 200 pixels. Here is the layout xml: When I run my app here is what the images look like: As you can see the images are getting scaled (narrowed) to fit the screen. How do I make it so the images are stretched both v...
Jan Tacci
1

votes
2

answer
1.1k

Views

How to make GridView Visible in VB.Net

I have a GridView on a form and it's not visible the browser even though Visible has been set to True in the Property Window. More so, I have the following code to enable data to be visible in the columns of the GridView, but nothing seems to work for me. I'd be glad if someone could help me out. Su...
Akaglo
1

votes
1

answer
2.6k

Views

Gridview Recycling issue with asynctask

When I scroll back and forth through my GridView, my images aren't recycled correctly and will ultimately display the same image throughout the grid. Adapter public class ImageAdapter extends BaseAdapter { private Context mContext; private List mList; private int mheight; private int mwidth; privat...
Joseph27
1

votes
1

answer
2k

Views

(Android - xml) Gridview and ImageView scale type centerCrop

I'm trying to show a list of images in a GridView, and I want to crop only the center of the images in this list. So below is the layout of each image item: And here is the layout that contains the grid view: And here is the result I got: This is weird because the images are all cropped in a strange...
huong
1

votes
2

answer
5.1k

Views

How to access values of row being deleted in RowDeleting event

I am trying to save a little bit of information before I delete it from the database. I'm using an asp gridview. I'm trying to retrieve the values from the row being deleted with the RowDeleting event. However, I've been extremely unsuccessful. Protected Sub gv1_RowDeleting(sender As Object, e As Sy...
BearSkyview
1

votes
1

answer
1.2k

Views

how to prevent disabled checkboxes of gridview from getting checked when select all checkbox is clicked?

I have used gridview in my aspx page.. In that i have a check box at each row including header.. By clicking the header checkbox it will check all the checkboxes including disabled checkboxes in gridview.. I need to avoid the disabled checkbox from getting checked This is my gridview code: This is m...
Xavier
1

votes
1

answer
5.9k

Views

Set highlighted item in GridView on Android

Sometimes I am really amazed to see that simple things have hard to find solutions. I have a GridView with 6 columns and multiple rows. Each item is a square having a color as background. When I select an item, it gets highlighted as the listSelector is set When I open the layout, containing the Gri...
Alin

View additional questions