Forms Data Controls :: Additional Column On Gridview With SQL Query
Nov 18, 2010
i want to add a column on to the end of the gridview that runs an sql query based on that ID i.e! select * from thistable where id = (0). so basicaly i want to bind a sql query as a column!! how would i do this?
have trouble to add delete column to gridview when using specific query.I have PK set up at the table, I need add specific query to display dataat gridview:
SELECT [PID], [GID], [TID], [SID], [NEWSID] FROM [TableOne] WHERE ([NAME] = ?)
After builder this query, I click advanced button. However, generate insert, update, and delete Statements is not enabled.
I have tried to query a table with an xml column by using XQuery and I can't get the Select to work.
All my knowledge/understanding of the subject comes from this MSDN article:
[URL]
so I am probably overlooking something minor:
I tried this query Select col1, Phone.Query('element CellPhone {I am not sure about what goes here} I tried {data('Phone/cellPhone} from aTable Where Phone.Exist('/Phone/cellPhone/text()[contains.,"412-8977"]') = 1 This syntax is definitely not fun.
i am doing a gridview which consists of 1 checkbox,1 linkbutton, 1 textbox and 1 image button. For all the cell which has the checkbox checked, i need to collect the data and update the database.
Form the gridview, i need to collect few information before i update the database. That is the cell informaion (checkbox and textbox), and also the Line information, shift (Grave/Morning) and also the date.
I am having problem in reading out the date of each cell belong to. By using the code GridView.HeaderRow.Cell(n). text , i only able to access shift information.
The Date Information is done by adding additional header row and its coding is as below:
I have a grid view with the delete option enabled. When the user clicks on delete, that entry in the database is deleted. However, each entry in my database corresponds to 2 images on the server. When that entry in the database is deleted, I also want to delete the images. (the images consist of the ID for that database entry plus "right.jpg", and "left.jpg") Is there a simple way to do this? My thoughts are that I need to run some additional code when the user clicks the delete button, but how can I trigger this code?
I want to display gridview column heading when mouse over to the particular column in the gridview.I am working in VisualStudio 2005 with MS.Net2.0 framework.I don't want to use ajax.
i will display the data in gridview (like a summary) and then user will click a button to generate pdf of the data. the content in the pdf is different to gridview.i mean in a table format not in gridview format plus some paragraph of text below.i dont know how to generate.
My data of gridview is exporting to excel sheet but it is exporting extra buttons in that page also and also exporting the navigation links that i have used in the master page, Below is my code:
I have a gridview which is binded to a Sqldatasource. I would like to replace a column data field value to 'Not Applicable' if that column has got a value of 2 in database.
When I select the Search By dropdown, an additional gridview is created on auto-postback.I will ad a visual and code as soon as this is accepted for review.
I am using GridView ,I want to do a validation like if i edit any one of the Cell in that column, it will through the validation when the sum of column value is more than 100. How can i do this validation?
As per my requirement, I am getting CompID, Company Name and URL from SQL database. I want to display just CompName and URL in gridvew. So, I need to hide the CompID in gridview. One way I can do BoundField field Visible to false but I need to retrive that compID id when user selected any of the row. if I set visible to false user wont see any compID in gridvew but I want access the selected compID also using SelectedRow.Cells[1].Text..
I have a grid view with 4 columns and 12 rows. Getting the row index is not problem; ;however, I cannot find a way to get the column index of the cell that i select.
We have a requirement to add an image column to the very left of the jqGrid. We have multiselect set to true, so there are checkboxes on the left. Now, we want to add some dotted lines(inside an image column) on the left of these checkboxes, as we're trying to make to look a little similar to gmail where some small dotted lines are available beside the checkboxes to enable email dragging.
how to implement Insert feature to a grid view?I need to use fields with scroll bar inside of a grid view. Is that possible through the template field?
I have one filed that is encrypted using Rajindal algorithm and stored in MSSQL db.When I retrieve that column in gridview it's displayed in encrypted. I have the code that decrypts it but the problem is:How can I all loop throw this column values in the gridview and decrypt them all and display it in the gridview decrypted.See my code below:
I'm facing a wierd problem with GridView and ObjectDataSource. I bind GridView to my business objects via ObjectDataSource. Everything was working fine until I decided to add a new field in my buisness object and wanted to add a column to GridView to show it. Somehow that column is NOT shown in the GridView's list of available columns. I have tried refreshing schema, rebinding, etc. I'm using GridView inside a user control which is used as a web part. Does that make a difference ?