Is there a way to Sort a Gridview by a Calculated Column? I have a gridview with template fields using lablels and a linq datasource. Those columns sort just fine. I can not get the Calculated column to sort, because there is no sort expression to use...
I'm using a DataSet to fill my gridview. The dataset contains several columns, like: direction - fromNumber - toNumberThe column direction can contain the values "incoming" or "outgoing". In my gridview, I would like to show only 2 columns, direction and from/to. If direction = "incoming", the values from fromNumber has to be inserted in "from/to". If direction = "outgoing", the values from toNumber has to be inserted in "from/to".I know I can use a TemplateField to show different text values in a column...But I have no idea how to do this when I want to show the values from a column...
I have a gridview with databound fields with a checkbox for each row. Only the check box is not bound to any field in the database. I have a button outside of the gridview. By clicking the button, I am trying to get the values of the partyID fields for all the rows that have the check box checked.
Upon clicking the button, nothing gets displayed but no error either.
I have SQL2012 database, which has a Table with many columns in it . One of the columns is "Start Date" and i set the dataType to "Date". Now I am putting the data into a gridview but the data is different to the database, the "Start Date" column has time as well. why this is happening ( the Start Date column is the gridview is a BoundField).
Split off from http://forums.asp.net/t/1595139.aspx:
I have an additional column called 'KPI %' in my gridview that calculates the percentage of two template fields and thus I cannot use the sortexpression on it. How can I sort the contents of the 'KPI %' column in ASC or DESC format?
I have 2 amount columns (Amount and TotAmount) in my gridview. In Amount column data comes from database. I want to display the total of amounts in Amount column in my TotAmount column (So there would be just one value in TotAmount column irrespective of the number of columns in Amount column). How can I do this.
My gridview displays fields from a table and allows for edit, delete and insert. I need to add a column with a derived field which will be calculated every time the user is either entering a new row or editing the value of the weight field which is one of the fields of the gridview. This calculation is done in the fly and won't be saved in the database.
i am having a boundfield column and in that column if i entered a string(without spaces) of length 15, there is no problem. But if the string is more than 15, the text is not wrapped. I gave the command column.ItemStyle.Wrap=true; But its not working. I have fixed the width of the column. How to wrap the text in the boundfield if a string more 15 characters.
I have a requirement to create multiple hyperlinks dynamically in a single GridView Column. The number of hyperlinks are not not known in advance and will depend on the results brought up by a query. How do I create the same?
In vb.net how can I get the value of a gridview's boundfield value? I'm basically putting a value in that boundfield that I need to access in the RowDeleting event so I can pass that into a stored procedure. I'd be open to also trying to get the value of a control from a template column too if that's a better method?