Questions tagged [autogeneratecolumn]

AutoGenerateColumns is a GridView/DataGrid property that helps create columns automatically.

AutoGenerateColumns is a GridView/DataGrid property that helps create columns automatically. When the AutoGenerateColumns property is set to true, an AutoGeneratedField object is automatically created for each field in the data source. Each field is then displayed as a column in the GridView control in the order that the fields appear in the data source. This option provides a convenient way to display every field in the data source; however, you have limited control of how an automatically generated column field is displayed or behaves.

65 questions
1
vote
1 answer

Programatically add ValidationRules to WPF DataGrid when autogenerating columns

I want to do this in the AutoGeneratingColumn event:
jostyposty
  • 133
  • 2
  • 14
1
vote
2 answers

Forcing AutoGenerateColumns to create DataGridViewTextBoxColumn for Boolean Data Types

I have a lot of read-only data, and I don't like the clickable look and feel of DataGridViewCheckBoxColumns which are unfortunately the default type for rendering Boolean data. Is there any way, either before or after using AutoGenerateColumns of a…
KyleMit
  • 30,350
  • 66
  • 462
  • 664
1
vote
2 answers

C# Datagridview - Turn off AutoGenerateColumns when binding to XML file?

I am binding an XML file to a DataGridView. I don't want the columns to be auto-generated, in fact I want to generate them myself. Is there a way of turning off the auto generating columns feature and be able to programmatically create the columns…
Goober
  • 13,146
  • 50
  • 126
  • 195
0
votes
0 answers

Inheritance can cause problems at AutoGenerateColumns property in DataGrid?

I just stumbled upon a behavior of the DataGrid in WPF and frankly I don't know if I did something wrong or its the standard behavior of the WPF DataGrid. So I have an interface, let's call it IItem. IItem has couple of properties (Name, Active,…
JahManCan
  • 601
  • 3
  • 8
  • 19
0
votes
1 answer

How to read a boolean that was bound to a Gridview with autogenerated columns

I am binding the Session Data to a Gridview with autogenerated columns in order to retrieve that data in case the session expired. Boolean columns are displayed…
Barnabeck
  • 459
  • 1
  • 6
  • 26
0
votes
1 answer

Create a Function with 'while' loop in python and use the function to generate a new column in a data frame

I tried to create a new function with "while" in Python. def pmv_calculator(ta, tr, vel, rh, met, clo, wme): pa = rh * 10 * np.exp(16.6536 - 4030.183 / (ta + 235)) icl = 0.155 * clo m = met * 58.15 w = wme * 58.15 mw = m - w if icl <= 0.078: fcl…
0
votes
3 answers

replacing the autogenerated checkbox feild with radio button in a Autogenerated columns Grid View

I have a Grid view for which columns are auto-generated. The binding data-table would be having a Bit(Boolean) column. Now when the data is binded, the check-box field is generated in place of the Bit Column. Requirement Check box fields needs to be…
suryakiran
  • 1,976
  • 25
  • 41
0
votes
1 answer

Include companyID for each customer and link it to other tables SQL

We have client data in our database that comes with ID(OrangeCustID), I am trying to autogenerate myCompanyID to each customer apart from the OrangeCustID and link it to the other tables and have it for our internal queries from SQL Server…
SMR
  • 401
  • 4
  • 15
0
votes
2 answers

Postgres - create a column (alter table) as a calculation of other two columns

I have a table in Posgres that contains task start and task end dates. It's possible to generate a column in this tale as rate between (current day -start day) /(start day-end day) the column is the % of time elapse. I try in this way but does not…
0
votes
0 answers

insert select with autogenerate column

I have 2 similar tables and they have a column with attribute autogenerate when I do : insert int target (col2,col3....) select col2,col3 from source I get an error : probabably because col1 (autogenerate) is not null and not specified with…
0
votes
1 answer

Auto generation of apply functions in python

I would like to create a function which, given a dictionary will be able to generate functions for apply, example: df = pd.DataFrame({"A" : [1,2,3,4], "B" : [4,5,6,7]}) it'a pandas dataframe. I want to create a 2 new columns: "D"…
ale_C
  • 51
  • 6
0
votes
1 answer

trying to insert json with a value that's being used with a generated datetime field

I have a simple table with a json field and a generated field from a value in the json: create table foo ( id integer primary key auto_increment , somedata json , a_date datetime generated always as convert(somedata->>theDateAsAString,…
user3791372
  • 4,445
  • 6
  • 44
  • 78
0
votes
1 answer

Asp.net c# GridView Sort AutoGenerateColumns false

i'm having trouble to be able to sort my gridview with the parameter AutoGenerateColumns = false The headers are not clickable and so i can't sort, although having the parameter AllowSort = true Here is my gridview:
Pedro Sousa
  • 231
  • 1
  • 2
  • 6
0
votes
3 answers

ASP.Net gridview AutoGenerateColumns="true" style & format textboxes in row when editing

There does not seem to be a lot of info out there when using a GridView with AutoGenerateColumns="true". In my scenario, I am attempting to use this because my GridView is dynamically pulling numeric values from a stored procedure. As you can see,…
0
votes
1 answer

Gridview, Autogenerated Column, Checkbox Column Editable

I have a gridview binded to a datasource.
Duncan_McCloud
  • 543
  • 9
  • 24