I have a populated gridview that consist of template fields. I would like to find/check a certain number of cells using values of rows and columns.
Eg:
|Time|col1|col2|col3|col4|col5|
|1200|------|-----|-----|------|-----|
|1300|------| -X- |-----|------|-----|
|1400|------|-----|-----|------|-----|
lets say i have the value "1300" for the row and the column header text "col2", I would like to find the cell marked "X" and check for some condition and change the text if necessary (col1 - col5 are template fields made up of labels and buttons, so therefore base on certain conditions i would like to show/hide the labels/buttons or change the text for the labels)
Thanks
By selective column display i mean the following:
a control shows a listing of widgets (WidgetVm.DisplayName), with the default display name being in English (WidgetVm.EnglishName), but with the option to show the widget in French (WidgetVm.FrenchName).
There also sorting and filtering available, which is why CollectionViewSource seems ideal. I know you can have multiple views over the same source but I haven't figured out how to do this yet. Is that the right approach to solving this? How?
Cheers,
Berryl
Is there any way to automatically wrap comments at the 80-column boundary as you type them? ..or failing that, any way to display a faint line at the coulmn 80 boundary to make wrapping them manually a little easier?
Several other IDEs I use have one or other of those functions and it makes writing comments that wrap in sensible places much easier/quicker.
[Edit] If (like me) you're using Visual C++ Express, you need to change the VisualStudio part of the key into VCExpress - had me confused for a while there!
I have created database which has columns
- MemName
- monthlyAmt
- CurrentInstAmt
I have bound the Memname column with a DropDownList box;
onselection of memname value in DropDownList box, the corresponding values of currentInstAmt and monthlyamt should be displayed in Textbox.
I am beginer in asp.net
I use sql server 2005 and asp.net C#.
Is there any two-way encryption method for int column of a table?
It can be user-defined-function in sql server 2005 or C# method.
I can't get away without writing some dynamic sql conditions in a part of my system (using Postgres).
My question is how best to avoid SQL Injection with the method I am currently using.
EDIT (Reasoning): There are many of columns in a number of tables (a number which grows (only) and is maintained elsewhere). I need a method of allowing the user to decide which (predefined) column they want to query (and if necessary apply string functions to). The query itself is far too complex for the user to write themselves, nor do they have access to the db. There are 1000's of users with varying requirements and I need to remain as flexible as possible - I shouldn't have to revisit the code unless the main query needs to change - Also, there is no way of knowing what conditions the user will need to use.
I have objects (received via web service) that generates a condition (the generation method is below - it isn't perfect yet) for some large sql queries.
The _FieldName is user editable (parameter name was, but it didn't need to be) and I am worried it could be an attack vector. I put double quotes (see quoted identifier) around the field name in an attempt to sanitize the string, this way it can never be a key word. I could also look up the field name against a list of fields, but it would be difficult to maintain on a timely basis.
Unfortunately the user must enter the condition criteria, I am sure there must be more I can add to the sanatize method? and does quoting the column name make it safe? (my limited testing seems to think so).
an example built condition would be "AND upper(brandloaded.make) like 'O%' and upper(brandloaded.make) not like 'OTHERBRAND'" ...
Any help or suggestions are appreciated.
Public Function GetCondition() As String
Dim sb As New Text.StringBuilder
'put quote around the table name in an attempt to prevent some sql injection
'http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html
sb.AppendFormat(" {0} ""{1}"" ", _LogicOperator.ToString, _FieldName)
Select Case _ConditionOperator
Case ConditionOperatorOptions.Equals
sb.Append(" = ")
...
End Select
sb.AppendFormat(" {0} ", Me.UniqueParameterName) 'for parameter
Return Me.Sanitize(sb)
End Function
Private Function Sanitize(ByVal sb As Text.StringBuilder) As String
'compare against a similar blacklist mentioned here: http://forums.asp.net/t/1254125.aspx
sb.Replace(";", "")
sb.Replace("'", "")
sb.Replace("\", "")
sb.Replace(Chr(8), "")
Return sb.ToString
End Function
Public ReadOnly Property UniqueParameterName() As String
Get
Return String.Concat(":" _UniqueIdentifier)
End Get
End Property
I have stacked bar chart in which the number of columns is dynamic, can change from 1 to n columns. I want the spacing between the charts and width of the bar to be consistent. How do I fix it. Please suggest solutions / ideas.
Is there any way to caculate the average of the non zero rows only for a column of data in a table in an RDLC for Microsoft report viewer?
ie
0
0
0
5
5
= 5 not 2
I tried Count( fields.n.value 0 ) to get the count of non zero rows, but it returned the
count of all rows.
Thanks!
Eric-
Hi
I feel stupid, but I can't get a TIMESTAMP column to be shown in human understandable way in a SELECT.
I could do that in MySQL, not in sqlite3.
Could someone show me an example please?
Thanks
I have huge amounts of data populating an HTML <table> having more than 200 rows and 200 columns.
However, when i scroll the page horizontally or vertically to view the data, the header columns (like th for instance) go beyond the page.
How can i scroll through the table and still keep the top row and leftmost column fixed so that i will always know what data im seeing.
Hello friends..
colNames: ['A','B','C','D'],
colModel: [
{ name: 'A', index: 'A', width: 90 },
{ name: 'B', index: 'B', width: 100 },
{ name: 'C', index: 'C', width: 70 },
{ name: 'D', index: 'D', edittype: 'select', width: 100, editoptions: { value: { 1: 'Yes', 2: 'No'}} }
],
My concersn here is.. I am displying A B C D values from db2... for Last Column D I need to put defalut drop down list for all the rows.
Thanks can any body help me out..
thanks
I have two tables:
create table [dbo].[Main]
(
[ID] [int] identity(1,1) primary key not null,
[Sign] [char](1) not null
)
create table [dbo].[Names]
(
[ID_Main][int] primary key not null,
[Name][nvarchar](128) not null,
constraint [FK_Main_Users] foreign key ([ID_Main]) references [dbo].[Main]([ID]),
constraint [CK_Name] unique ([Name], [Sign])
)
The problem is with the second constraint CK_Name
Is there a way to make a constraint target column from a foreign table?
Hi,
I have two tables:
create table [dbo].[Main]
(
[ID] [int] identity(1,1) primary key not null,
[Sign] [char](1) not null
)
create table [dbo].[Names]
(
[ID_Main][int] primary key not null,
[Name][nvarchar](128) not null,
constraint [FK_Main_Users] foreign key ([ID_Main]) references [dbo].[Main]([ID]),
constraint [CK_Name] unique ([Name], [Sign])
)
The problem is with the second constraint CK_Name
Is there a way to make a constraint target column from a foreign table?
hi
i want to know how to get all column value from table using sphinx search...
i have configuration file, that file can get only one field from table.
but i need all field value.
where will i modify for getting all field from table.
thanks and advance...
Cell C1 contains a date.Macro to check the date in C1, if the same date is mentioned in row 3 then copy all matching date data beneath it from D6 downwards, paste to sheet2, cell b3.Also copy a6 column downwards to sheet2, cell a3.
Hi,
I am trying to show/load different editor on different rows of a editorgridpanel. Like a textbox on one row combobox/superboxselect on another and it could be any order, random.
The conditions which dictate which editor will be shown reside in the database.
Please tell me if this is possible and if so, how do i go about it.. I have tried pulling the conditions asynchronously which are pulled on a click event for the respective column, but calling it async causes problems. Please advise
Hi,
In CSV file, Column is having some times numeric values and some times alphanumeric values.
when try to read the CSV files to DATASET, alphanumeric values is showing as null(Blank).
How to see alphanumeric values?
Thanks
I’ve been trying to understand some strange values in the RESOURCE_ASSOCIATED_ENTITY_ID column of SYS.DM_TRAN_LOCKS when RESOURCE_TYPE is “OBJECT”. Although these should be object Ids, I cannot determine what object they actually refer to.
I’ve tried everything I can think of, including querying all system tables with columns of type INT and BIGINT to see if I can find the value. No luck. The funny values actually appear in SYS.DM_TRAN_LOCKS, SYS.SYSLOCKINFO and SP_LOCK.
I have two columns in my table with equal width(50%, 50%).
I am showing search results URL in them. For big urls the columns are stretching and destroying the layout.
Any suggestion to the problem?
Thanks & Regards,
Subrat.
There is a control in Visual Studio's Class Details window (accessed via Class Diagram) which combines a ListView with a TreeView. The result looks something like this:
TreeViewNode1
Column 1 Column 2 Column 3
Column 1 Column 2 Column 3
TreeViewNode2
Column 1 Column 2 Column 3
Column 1 Column 2 Column 3
All of the TreeView Nodes are collapsable so that you can view only the nodes you want to. I am looking to implement this, but it doesn't seem to be a .net control. Does anyone know of a control which already exists that allows this? It has to be free (as in beer).
My Table:
[LocationId]
[Address]
[ZipCode]
When I show a list of Location's, I also want to show the distance from a given zip code.
In Asp.Net Web Forms I had a stored procedure that would return the distance and I would call this SP on ItemDataBound on my GridView.
Or, I also would have my SP that is returning the Location list add another column ([Distance]) which I could display in my GridView.
How would you do this using Entity Framework and Asp.Net Mvc 2?
Hi everyone,
SELECT * FROM jobs WHERE (SELECT DISTINCT jobs.* FROM jobs, job_requests WHERE (jobs.user_id = 1) OR (job_requests.user_id = 1 AND job_requests.job_id = jobs.id))
This sql gives me Mysql::Error: Operand should contain 1 column(s). If i execute the select from the where clause it works SELECT DISTINCT jobs.* FROM jobs, job_requests WHERE (jobs.user_id = 1) OR (job_requests.user_id = 1 AND job_requests.job_id = jobs.id)
Could somebody explain me why? This query is generated by rails activerecord so the main select is needed.