I have a column in datagridview which is display the vendor services. It is a textbox type when display. However, when I want to edit the service. I would like to click on the cell, and the cell change to combobox for me to choose. How can I do that?
I have a gridview that loads with a new datasource on button click event. On the gridview (which is located in a table columm incidentally) are 2 columns, a descriptor and a checkbox. The problem is that after postback, the column widths change, the checkbox column expands and the other column contracts. Is there a way to keep the gridview column sizes the same after postback?
I have a series of dropdownlists on webform in ASP 4.0. The first drop down is filled upon load, and then when a user selects a value from that list, it populates the second dropdown. To accomplish this, I have a SQLdatasource with a parametersource of the first drop-down list control. This works great, except when a user changes their selection from the first drop down. It performs the query, but then adds the list of items to the ones that were already there from the previous selection, instead of replacing it with the new data. Here is the code:
Do I need to do something on selectedindexchanged to somehow "clear out" the previous datasource? I can't find anything about this online, although one person seemed to suggest it was related to using a master page. (which I am using).
I need to create my first (and simple) .net 4 web application that needs to be viewed in English, French and Italian. I've created and tested a sample web application that works fine with implicit and explicit localization set via web browser language preferences.
Now I'd like to add a simple Combo Box in the master page or in the login page to let the user choose the preferred language and would like the site to change its language based on this. I do not know how to start and to accomplish this task.
When the data is retrieved through a stored procedure using the SQLDatasource control that is binded to a gridview control, I want to change some data that is in some of the columns. Can i do this in one of the events either in the gridview or data control? I know you can do some formatting on the aspx page side such as dates, etc. but was wondering if I can do it on the vb code side?
i have this gridview that displays a list of employees, with they're names and also the department they work in. ok so lets say i have a combo box and i want to filter by department, or that i have a textbox and i write "Doe" so that brings all the employees with that last name.
i have 2 combobox A & B.. the values in B is populated according to selected value in A,, my code works fine when i click combo A and select a item,, the values according to it get populated on combo B. i have written it on the change event...
But when i use tab to navigate and select the items in combo A and change on pressing keyboard down key...the items in combo B is not getting populated with new values.. existing values does not get changed,,, ie change event is not getting fired... how can i manage it in down/up key in keyboard when using tab,,,,
Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?
I have a GridView with an alternating Css style. The GridView has a column called tradeId. What I want to show is an alternating colour based on a change in the tradeId. Is this possible? It will make it easier on the eye to group trades together by colour. Here's the GridView code as it is right now:
I am developing web-app in .NET for 5 months (and enjoying it =)) and I am reading 3 books, all of them teachs at least 2 methods for acessing data: ADO.NET and SqlDataSource object.
I am used to work with ADO.NET method because I feel that even if it needs coding by hand, I can separate the SQL routines from the page and I can customize database routines better.
For now I am using DataReader mode because the application and the database is on the same server and there is only 1Gb RAM available so there is no advantage using DataSet on this moment.
Am I thinking this right? There are some things with SqlDataSource that I don't know how to do it well...
I have a routine that inserts a record on a table then gets the ID of this record using SCOPE_IDENTITY() function of SQL Server, than it uses this ID to insert another record on another table. Because I use a one-to-many relationship on multiple tables...
How can I work this situation using SqlDataSource object, is it even possible?
I have a table with articles. Every article has a column named category which value is either 1 or 2 On my landingpage the article headers are displayed as hyperlinks. All the articles with category 1 will be displayed in a repeater control on the left side of page and all the articles with category 2 will be displayed in another repeater control on right side of page. I know I can bind the repeaters to two different sqldatasource controls with different SELECT statements. But I wonder if I can do this by only using one sqldatasource control, and if this is better and proper way of doing it. If so, do I create a (datatable?) and do the sorting there?
i designed a gridview to update, delete the records using sqldatasource, (there is no code in my aspx.cs file) but i dont know how to add the new row the gridview. so that if the table is empty then i cant add / update / delete the data.
how to Add new record on gridview using SQLDatasource without any code behind code?
Up until now I only needed one connection string since I had only one database but this has changed since I want some users to connect to database A and others to database B What would be the correct way to go about it?
I'm using Visual Web Developer 2010 Express. This is my first attempt at creating a .NET page. I have a Gridview on a page that displays the results of a GridQuery. This works. I have a checkbox control(cb_Filter) on the same page that if checked, should add to the where clause of the GridQuery, (where Column5 IS NULL). How do I check the state of the check box so it will run the query with or without the "filter".
I have a combox box inside a dataform which is bound to riacontrol's datadomainsource say "x" and data form is bound to riacontrol's datadomainsource say "y". Now when I am submiting change then I am not able to find the selected value for the combo box for dataform's data property. It is showing 0 to me.
i am facing a minor problem but can't find out its syntaxi have listview, and inside the template i have 2 labels, in design time i bind 1 label to one column thatis 'type' and depending upon this type i want to bind other labels to different columnsif type is question than 2 label will have to show data of question columnif type is job than 2 label will have to show data of job, so on........how to accomplish this,in databinding event handler i can check the value of typebut i want to know the syntax of binding 2 label in run time, with different fields using EVAL
I am using Visual Web Developer (VWD)and I dragged in i.e created a Gridview. In the codebehind of the page, I will like to declare an sqldatasource and get data from a database using the sqldatasource and then bind the sqldatasource to the Gridview. PS: I know how to drag-in an sqldatasource and attach it to the gridview using VWD but this time, I want to do this declaratively in the codebehind.