.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Trying to incorporate the use of a dropdown list control with a grid view control

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net
 

I'm trying to setup a page that will utilize a dropdown list control inside of a grid view control using VS 2005 2.0 version. Everything that I can find online seems to only show the use of the dropdown list control using a data grid. I don't want to use a data grid because it doesn't have the functionality/ power as the grid view control. Can someone please tell me how I can incorporate a dropdown list control with the grid view control? Here is a copy of my code.



<asp:GridView ID="HardwareSetdv" runat="server" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="AcctID"
        DataSourceID="HardwareSetSqlDataSource">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="HardwareSetID" HeaderText="HardwareSetID"
                InsertVisible="False" ReadOnly="True" SortExpression=&quo


View Complete Post


More Related Resource Links

Unable to store combo box value to data grid view control

  
Hello,         I am using fw 3.5 SP1 with VS2008. I have bind my object collection with data grid view. I can see different values in combo box inside data grid view. But when I select any one value from combo box the selected value is changed to first value of combo box as soos as user leave the cell of the gird. Can anyone tell me where should I look for this problem so that my selected value remains same as user did select it.   Nilkanth Desai  

Grid view control problem

  
HiI am using the grid view control where i am using <asp:CommandField for editing & deleting i want to visible false of this coloumn with edit & delete button..how do this.Thanks<asp:GridView DataKeyNames="StaffCalendarId"  PagerSettings-Mode="NumericFirstLast"                                                        PagerStyle-HorizontalAlign="Center" ShowHeader="true" AllowPaging="true" AutoGenerateColumns="False"                                                        Width="100%" ID="gvEventInfo" runat="server" CellPadding="4" ForeColor="#333333"                            &nbs

problem in selecting deslecting multiple records in grid view by clicking control key.plz help

  

i want to select/deselect multiple records inside grid view by clicking control key.I can do the selection but the deselection is not working properly..there is some thing wrong in the  logic.plz help me to solve the problem.

my java script function is like..

<script language="javascript" type="text/javascript">

    function FillColor(cellid, id, evt) {
    
        var isSelected = document.getElementById('<%=hidSelectedRow.ClientID%>');
        alert(cellid);
        if (!evt) var evt = window.event;
        ctrlPressed = evt.ctrlKey;
        if (!ctrlPressed) {
            //alert(ctrlPressed);
            var clearCellColor = document.getElementById('hidCellId').value.split(',');
            for (i = 0; i < clearCellColor.length; i++) {
                document.getElementById(clearCellColor[i]).bgCol

HELP ! - how to disable spesific control inside the grid view

  

Hello....

I need to disable the "Imagebuttons" after the user click on one of them... I've sucessfully updated the table when the user click on a button using the following code on the event of row command of the gridview...

PLEASE NOTE THE THE GRIDVIEW IS INSIDE UPDATE PANEL !

if (e.CommandName == "voter_up")
        {
            SqlCommand voteup = new SqlCommand("update arto_comments set voteup = voteup+1 where cid=" + e.CommandArgument, con);
            SqlCommand getVup = new SqlCommand("select voteup from arto_comments where cid =" + e.CommandArgument, con);
            con.Open();
            voteup.ExecuteNonQuery();
            //lblvoteup.Text = Convert.ToString(getVup.ExecuteScalar());
            con.Close();
            //GridView1.Rows[1].FindControl("ImageButton1"). = false;
            ImageButton1.Enabled = false;
            GridView1.Rows[0].FindControl("ImageButton1").Controls;
}




so please how may I disable these buttons after database is updated ?

Thanx and Regards


Populate in dropdown list control

  

Hello need some help on this one.  I am using ASP.NET with C# and Oracle database. I am trying to return some values from my select statement to fill my dropdown list control. I am designing this in a 3 tier architecture.  Here is my codes.  I am getting an error which states "Object reference not set to an instance of an object." I am returning the field name "NAME" to be filled in my dropdown control.  What I am doing wrong?

 

List.cs file code

public static string _GetClientList()

{

string clients = string.Empty;int SessUserID =

problem in selecting deslecting multiple records in grid view by clicking control key through java

  

i want to select/deselect multiple records inside grid view by clicking control key.I can do the selection but the deselection is not working properly..there is some thing wrong in the  logic.plz help me to solve the problem.

my java script function is like..

<script language="javascript" type="text/javascript">

    function FillColor(cellid, id, evt) {
    
        var isSelected = document.getElementById('<%=hidSelectedRow.ClientID%>');
        alert(cellid);
        if (!evt) var evt = window.event;
        ctrlPressed = evt.ctrlKey;
        if (!ctrlPressed) {
            //alert(ctrlPressed);
            var clearCellColor = document.getElementById('hidCellId').value.split(',');
            for (i = 0; i < clearCellColor.length; i++) {
                document.getElementById(clearCellColor[i]).bgC

Display rating control in xslt list view webpart without table header

  

Hi,

In the same code, pasted above if I want to display rating control using xslt list view webpart what I need to write.

I have created few xslt list view webparts for my site but I am not able to display rating control using xslt. I am writing something like this

<xsl:apply-templates select="$Fields[@Name='AverageRating']" mode="PrintField">
              <xsl:with-param name="thisNode" select="."/>
              <xsl:with-param name="Position" select="$Position"/>
            </xsl:apply-templates>

But for this I think i need to include some parameter or any particular template. Using the above type of code in xslt this is not working. I do not want to display table header row. Please guide me on this.


-Prashant

Using Drop down menu in a grid view control for entering new data

  

I wish to use drop down menu(based on a table of my database) to update/insert data in a web form. The data is then fetch in to SQL table (Express).

How to do it ? 


Bind nested grid view and find value from control within nested grid

  
The article Bind nested grid view and find value from control within nested grid was added by ramkrishnsaini on Wednesday, December 29, 2010.

Introduction: In this article i'm posting "How to bind nested grid view and work with nested control with nested grid view".Binding nested grid and work with any control of nested grid view is something different than normal grid view. In

Allow non-admin users view site and list settings (delegate control feature?).

  

I wonder if anyone knows of a way to allow regular users to view settings for sites, lists and document libraries (e.g. versioning, navigation, library template settings) without granting them permissions to change these settings?

Why do I need it? 

This is to allow 1st line support to gather some information and identify possible causes of user issues without having to escalate every call to users with admin or site owner permissions. 


Scenario 

A user logs a call saying he's uploaded a document but other users cannot see it. Now,

Custom Control Design view error

  

Hi

I have created a custom control from scratch and it works fine as in you can build the project that uses it and it works fine at runtime. Problem is when you go to design view the control shows an error in the place of where the control should be rendered.

Error: '<SomeValue>' Could not be set to '<SomeProperty>'


This shows up on all my custom set properties. These properties are created as basic as possible. I can give the properties values in Source view and run the app just fine. I can even add a Onclick event. If I don't set any custom properties the control will render fine in Design view. It's only when I set a value to a custom property.


Property Code Example:

public string Text
        {
            get
            {
                string ret = "";
                object obj = ViewState["Text"];
                if (obj != null)
                {
                    ret = obj.ToString();
                }
                return ret;
            }
            set
            {
                ViewState["Text"] = value;
            }
        }


I've even removed the Category and Description tags with no difference.

I don't know if what I said makes sens, but I hope it

Cutting Edge: A New Grid Control in Windows Forms

  

Grid controls are essential in many of today's apps. Until now, though, most developers using Visual Basic® have had to buy third-party components to get an effective, easy to use grid component. The Windows® Forms DataGrid turned out to lack too many features for the average developer.

Dino Esposito

MSDN Magazine April 2005


Security Briefs: Access Control List Editing in .NET

  

Access control lists (ACLs) can be complex beasts, and user interfaces for editing them are incredibly tricky to implement properly. That's why I was really excited when Windows® 2000 shipped with a programmable ACL editor, shown in Figure 1.

Keith Brown

MSDN Magazine March 2005


Getting user control in NewForm.aspx of the list

  
Hi,

I have designed a user control where i have placed some custom fields as per my requirement now my next step is as soon as user clicks 'Create' under Site Settings it should take him to my user control page instead of Newform.aspx default page of the list.Just let me know your suggestions to achieve this as it would help me a lot

Thanks & Regards,

Sudheer

Has anyone experienced problems using a reorder list control in Chrome/Firefox?

  

I have three reorder lists on a page, one does not want to work. It is no different to the others, but is behaving like it is not enabled.

All working fine in IE 7 + 8.

Any ideas appreciated :)


Applying custom CSS to the MOSS 2007 Calendar control Month view

  

hi,

I have a requirement to use the MOSS 2007 Calendar Control - month view is to apply a custom css to have a look and feel as per our requirements.

We tried applying the custom css to the MOSS 2007 calendar control - month view, it does take the custom css and applies it, but when i click on any date and come back to the calendar control, it changes the CSS of the MOSS calendar control back to the default one.

Let me know if anyone has any suggestion on  how to customize the calendar control for css for our intranet application.

Your response would be highly appreciated.

regards

Ram

 

 


PC
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend