473,473 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

selectedindex of multiple listbox selection in a datagrid

Lie
Hi all,

I have problem in getting selectedindex of multiple listbox selection in a
datagrid. I have a listbox with multiple selection mode inside datagrid. In
Edit mode, I need to get back all selected items of that listbox and display
it.
can anyone help?

Thanks

rgds,
Lie
Nov 19 '05 #1
5 3508
Hi Lie,

You need to get a reference to the listbox from the datagriditem that was
clicked. After that, you loop through the listbox items to see which ones
were selected. I've put some code below that demonstrates the idea.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
DataGrid1.DataSource = CreateDataSource()
DataGrid1.DataBind()
End If
End Sub

Private Sub DataGrid1_ItemCommand _
(ByVal source As Object, ByVal e As _
System.Web.UI.WebControls.DataGridCommandEventArgs ) _
Handles DataGrid1.ItemCommand
Dim lbx As ListBox
Dim lbxitm As ListItem
Dim itm As DataGridItem
itm = e.Item
lbx = itm.Cells(0).FindControl("listbox1")
Label1.Text = ""
For Each lbxitm In lbx.Items
If lbxitm.Selected = True Then
Label1.Text = Label1.Text & lbxitm.Text & "<br>"
End If
Next
End Sub
Function CreateDataSource() As DataTable
Dim dt As New DataTable
Dim dr As DataRow
dt.Columns.Add(New DataColumn _
("IntegerValue", GetType(Int32)))
dt.Columns.Add(New DataColumn _
("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn _
("CurrencyValue", GetType(Double)))
dt.Columns.Add(New DataColumn _
("Boolean", GetType(Boolean)))
Dim i As Integer
For i = 0 To 8
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 1.23 * (i + 1)
dr(3) = (i = 4)
dt.Rows.Add(dr)
Next i
Return dt
End Function 'CreateDataSource

<p>
<asp:label id="Label1" runat="server"></asp:label></p>
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False">
<columns>
<asp:templatecolumn>
<itemtemplate>
<p>
<asp:listbox id="ListBox1" runat="server"
SelectionMode="Multiple">
<asp:listitem
Value="Red">Red</asp:listitem>
<asp:listitem
Value="Green">Green</asp:listitem>
<asp:listitem
Value="Blue">Blue</asp:listitem>
<asp:listitem
Value="White">White</asp:listitem>
</asp:listbox></p>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText="StringValue">
<itemtemplate>
<asp:Label runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.StringValue") %>'>
</asp:label>
</itemtemplate>
</asp:templatecolumn>
<asp:buttoncolumn Text="Select"
CommandName="Select"></asp:buttoncolumn>
</columns>
</asp:datagrid>

"Lie" <Li*@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com...
Hi all,

I have problem in getting selectedindex of multiple listbox selection in a
datagrid. I have a listbox with multiple selection mode inside datagrid.
In
Edit mode, I need to get back all selected items of that listbox and
display
it.
can anyone help?

Thanks

rgds,
Lie


Nov 19 '05 #2
Ken,
You example was good, but there is one line that I believe should be
simplified:

lbx = itm.Cells(0).FindControl("listbox1")

Since you are using a TemplateColumn, and you control the ID, it is
unnecessary to call e.Item.Cells(0).FindControl(). You can merely call
e.Item.FindControl("listbox1"), and you will find the control.

--
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Lie,

You need to get a reference to the listbox from the datagriditem that was
clicked. After that, you loop through the listbox items to see which ones
were selected. I've put some code below that demonstrates the idea.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
DataGrid1.DataSource = CreateDataSource()
DataGrid1.DataBind()
End If
End Sub

Private Sub DataGrid1_ItemCommand _
(ByVal source As Object, ByVal e As _
System.Web.UI.WebControls.DataGridCommandEventArgs ) _
Handles DataGrid1.ItemCommand
Dim lbx As ListBox
Dim lbxitm As ListItem
Dim itm As DataGridItem
itm = e.Item
lbx = itm.Cells(0).FindControl("listbox1")
Label1.Text = ""
For Each lbxitm In lbx.Items
If lbxitm.Selected = True Then
Label1.Text = Label1.Text & lbxitm.Text & "<br>"
End If
Next
End Sub
Function CreateDataSource() As DataTable
Dim dt As New DataTable
Dim dr As DataRow
dt.Columns.Add(New DataColumn _
("IntegerValue", GetType(Int32)))
dt.Columns.Add(New DataColumn _
("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn _
("CurrencyValue", GetType(Double)))
dt.Columns.Add(New DataColumn _
("Boolean", GetType(Boolean)))
Dim i As Integer
For i = 0 To 8
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 1.23 * (i + 1)
dr(3) = (i = 4)
dt.Rows.Add(dr)
Next i
Return dt
End Function 'CreateDataSource

<p>
<asp:label id="Label1" runat="server"></asp:label></p>
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False">
<columns>
<asp:templatecolumn>
<itemtemplate>
<p>
<asp:listbox id="ListBox1" runat="server"
SelectionMode="Multiple">
<asp:listitem
Value="Red">Red</asp:listitem>
<asp:listitem
Value="Green">Green</asp:listitem>
<asp:listitem
Value="Blue">Blue</asp:listitem>
<asp:listitem
Value="White">White</asp:listitem>
</asp:listbox></p>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText="StringValue">
<itemtemplate>
<asp:Label runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.StringValue") %>'>
</asp:label>
</itemtemplate>
</asp:templatecolumn>
<asp:buttoncolumn Text="Select"
CommandName="Select"></asp:buttoncolumn>
</columns>
</asp:datagrid>

"Lie" <Li*@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com...
Hi all,

I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid.
In
Edit mode, I need to get back all selected items of that listbox and
display
it.
can anyone help?

Thanks

rgds,
Lie

Nov 19 '05 #3
Lie
Hi,

Thanks for all replies.
I've tried both ways:
lbx = e.Item.FindControl("listbox1")
and
lbx= e.Item.Cells(8).FindControl("listbox1")

both return nothing ..couldn't find the control. any idea?

Thanks
rgds,
Lie

"Jeffrey Palermo [MCP]" wrote:
Ken,
You example was good, but there is one line that I believe should be
simplified:

lbx = itm.Cells(0).FindControl("listbox1")

Since you are using a TemplateColumn, and you control the ID, it is
unnecessary to call e.Item.Cells(0).FindControl(). You can merely call
e.Item.FindControl("listbox1"), and you will find the control.

--
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Lie,

You need to get a reference to the listbox from the datagriditem that was
clicked. After that, you loop through the listbox items to see which ones
were selected. I've put some code below that demonstrates the idea.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
DataGrid1.DataSource = CreateDataSource()
DataGrid1.DataBind()
End If
End Sub

Private Sub DataGrid1_ItemCommand _
(ByVal source As Object, ByVal e As _
System.Web.UI.WebControls.DataGridCommandEventArgs ) _
Handles DataGrid1.ItemCommand
Dim lbx As ListBox
Dim lbxitm As ListItem
Dim itm As DataGridItem
itm = e.Item
lbx = itm.Cells(0).FindControl("listbox1")
Label1.Text = ""
For Each lbxitm In lbx.Items
If lbxitm.Selected = True Then
Label1.Text = Label1.Text & lbxitm.Text & "<br>"
End If
Next
End Sub
Function CreateDataSource() As DataTable
Dim dt As New DataTable
Dim dr As DataRow
dt.Columns.Add(New DataColumn _
("IntegerValue", GetType(Int32)))
dt.Columns.Add(New DataColumn _
("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn _
("CurrencyValue", GetType(Double)))
dt.Columns.Add(New DataColumn _
("Boolean", GetType(Boolean)))
Dim i As Integer
For i = 0 To 8
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 1.23 * (i + 1)
dr(3) = (i = 4)
dt.Rows.Add(dr)
Next i
Return dt
End Function 'CreateDataSource

<p>
<asp:label id="Label1" runat="server"></asp:label></p>
<asp:datagrid id="DataGrid1" runat="server"
autogeneratecolumns="False">
<columns>
<asp:templatecolumn>
<itemtemplate>
<p>
<asp:listbox id="ListBox1" runat="server"
SelectionMode="Multiple">
<asp:listitem
Value="Red">Red</asp:listitem>
<asp:listitem
Value="Green">Green</asp:listitem>
<asp:listitem
Value="Blue">Blue</asp:listitem>
<asp:listitem
Value="White">White</asp:listitem>
</asp:listbox></p>
</itemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText="StringValue">
<itemtemplate>
<asp:Label runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.StringValue") %>'>
</asp:label>
</itemtemplate>
</asp:templatecolumn>
<asp:buttoncolumn Text="Select"
CommandName="Select"></asp:buttoncolumn>
</columns>
</asp:datagrid>

"Lie" <Li*@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com...
Hi all,

I have problem in getting selectedindex of multiple listbox selection in a datagrid. I have a listbox with multiple selection mode inside datagrid.
In
Edit mode, I need to get back all selected items of that listbox and
display
it.
can anyone help?

Thanks

rgds,
Lie


Nov 19 '05 #4
Hey Lie, post the code? You may not being looking in the right cell.
"Lie" <Li*@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
Hi,

Thanks for all replies.
I've tried both ways:
lbx = e.Item.FindControl("listbox1")
and
lbx= e.Item.Cells(8).FindControl("listbox1")

both return nothing ..couldn't find the control. any idea?

Thanks
rgds,
Lie


Nov 19 '05 #5
Lie
Hi Ken,

Here's the code:

<asp:datagrid id="dgAssignMM" runat="server" Width="100%"
Font-Size="X-Small" BackColor="White" Font-Names="Tahoma" PageSize="20"
AutoGenerateColumns="False" BorderColor="#CC9966" BorderStyle="None"
BorderWidth="1px" CellPadding="1" DataKeyField="no">
<SelectedItemStyle Font-Bold="True" ForeColor="Black"
BackColor="LightCoral"></SelectedItemStyle>
<EditItemStyle BackColor="LightCoral"></EditItemStyle>
<AlternatingItemStyle
BackColor="MistyRose"></AlternatingItemStyle>
<ItemStyle ForeColor="#330099"
BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC"
BackColor="#A51C44"></HeaderStyle>
<FooterStyle ForeColor="#330099"
BackColor="#FFFFCC"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderText="Action"
ItemStyle-VerticalAlign=Top >
<HeaderStyle Wrap="False" HorizontalAlign="Center"
Width="10%"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:ImageButton id="Imagebutton6" runat="server"
AlternateText="Edit Data" Imageurl="../images/edit_mm.gif"
CommandName="edit"></asp:ImageButton>
<asp:ImageButton id="ImageButton5" runat="server"
AlternateText="Edit Data" Imageurl="../images/Delete_mm.gif"
CommandName="delete"></asp:ImageButton>
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton id="Imagebutton7" runat="server"
AlternateText="Save Data" Imageurl="../images/save_mm.gif"
CommandName="update"></asp:ImageButton>
<asp:ImageButton id="Imagebutton8" runat="server"
AlternateText="Cancel Updates" Imageurl="../images/Cancel_mm.gif"
CommandName="cancel"></asp:ImageButton>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="DIR UserID"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<%# Container.DataItem("dir_id") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlDIR_ID" runat="server"
Font-Size="8pt" SelectedIndex='<%#
GetSelectedIndex("dir_id",Container.DataItem("dir_ id")) %>'
DataValueField="dir_id" DataTextField="dir_id"
DataSource='<%#GetSource("dir_id")%>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="MM Head UserID"
ItemStyle-VerticalAlign=Top >
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<%# Container.DataItem("mm_head") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlMM_head" runat="server"
Font-Size="8pt" SelectedIndex='<%#
GetSelectedIndex("mm_head",Container.DataItem("mm_ head")) %>'
DataValueField="mm_head" DataTextField="mm_head"
DataSource='<%#GetSource("mm_head")%>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="MM UserID"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<%# Container.DataItem("username") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id=ddlName runat="server"
Font-Size="8pt" DataValueField="username" DataTextField="username"
DataSource='<%#GetSource("username")%>' SelectedIndex='<%#
GetSelectedIndex("username",Container.DataItem("us ername")) %>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Cust Sector"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate>
<%# Container.DataItem("custsector")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlCustSector" runat="server"
Font-Size="8pt" DataValueField="custsector" DataTextField="custsector"
DataSource='<%#GetSource("custsector")%>' SelectedIndex='<%#
GetSelectedIndex("custsector",Container.DataItem(" custsector")) %>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Industry Code"
ItemStyle-VerticalAlign=Top >
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate>
<%# Container.DataItem("industry_code")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlIndustry_code"
runat="server" Font-Size="8pt" DataValueField="Industry_Code"
DataTextField="Industry_Code" DataSource='<%#GetSource("Industry_Code")%>'
SelectedIndex='<%#
GetSelectedIndex("Industry_Code",Container.DataIte m("Industry_Code")) %>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="SVC_AMG"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate>
<%# Container.DataItem("svc_amg")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlsvc_amg" runat="server"
Font-Size="8pt" DataValueField="svc_amg" DataTextField="svc_amg"
DataSource='<%#GetSource("svc_amg")%>' SelectedIndex='<%#
GetSelectedIndex("svc_amg",Container.DataItem("svc _amg")) %>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Country"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate>
<%# Container.DataItem("country")%>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList id="ddlCountry" runat="server"
Font-Size="8pt" DataValueField="country" DataTextField="country"
DataSource='<%#GetSource("country")%>' SelectedIndex='<%#
GetSelectedIndex("country",Container.DataItem("cou ntry")) %>'>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="custsector Test"
ItemStyle-VerticalAlign=Top>
<HeaderStyle Wrap="False"
HorizontalAlign="Center"></HeaderStyle>
<ItemTemplate>
<asp:Label ID="lblCustSector"><%#
Container.DataItem("custsector")%></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:ListBox ID=lstCustSector Runat=server
Font-Size="8pt" DataValueField="custsector" DataTextField="custsector"
DataSource='<%#GetSource("custsector")%>'></asp:ListBox>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC"></PagerStyle>
</asp:datagrid>
Public Function GetSource(ByVal col As String)
Dim dt As New DataTable()
Select Case col.ToLower
Case "dir_id"
dt = CorpHandler.GetMMUsername("dir_id", "")
Case "mm_head"
dt = CorpHandler.GetMMUsername("mm_head", "")
Dim newRow As DataRow
newRow = dt.NewRow
newRow(0) = ""
dt.Rows.Add(newRow)

Case "username"
dt = CorpHandler.GetMMUsername("username", "")
Dim newRow As DataRow
newRow = dt.NewRow
newRow(0) = ""
dt.Rows.Add(newRow)

Case "custsector"
dt = CorpHandler.GetMMCustSector
Dim newRow As DataRow
newrow = dt.NewRow
newrow(0) = "ALL"
dt.Rows.InsertAt(newrow, 0)

Case "industry_code"
dt = CorpHandler.GetMMIndustryCode
Dim newRow As DataRow
newrow = dt.NewRow
newrow(0) = "ALL"
dt.Rows.InsertAt(newrow, 0)

Case "svc_amg"
dt = CorpHandler.GetMMSVC_AMG
Dim newRow As DataRow
newrow = dt.NewRow
newrow(0) = "ALL"
dt.Rows.InsertAt(newrow, 0)

Case "country"
dt = CorpHandler.GetMMCountry
Dim newRow As DataRow
newrow = dt.NewRow
newrow(0) = "ALL"
dt.Rows.InsertAt(newrow, 0)
End Select
Return dt
End Function

Function GetSelectedIndex(ByVal col As String, ByVal value As Object) As
Integer
Dim bEmpty As Boolean = False
Dim row As DataRow
Dim iLoop As Integer
Dim iSel As Integer = -1
Dim sData As String
Dim sValue As String

Dim dt As New DataTable()
dt = GetSource(col)

For iLoop = 0 To dt.Rows.Count - 1
If IsDBNull(dt.Rows(iLoop)(col)) Then
sData = "-9999"
Else
sData = dt.Rows(iLoop)(col)
End If

If IsDBNull(value) Then
sValue = "-9999"
Else
sValue = value.ToString.Trim.ToUpper
End If
If sValue = sData Then
'Return iLoop
iSel = iLoop
Exit For
End If

Next iLoop

If iSel = -1 Then
For iLoop = 0 To dt.Rows.Count - 1
If IsDBNull(dt.Rows(iLoop)(col)) Then
sData = "-9999"
Else
sData = dt.Rows(iLoop)(col)
End If
If sData = "" Then
Return iLoop
End If
Next
Else
Return iSel
End If
dt.Dispose()
End Function
Private Sub dgAssignMM_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgAssignMM.ItemCommand
Dim lbx As ListBox
Dim lbxitm As ListItem
Dim itm As DataGridItem
Dim arr As Array
itm = e.Item
'lbx = e.Item.FindControl("lstCustSector")
'e.Item.Cells(9).FindControl("lstcustsector")

arr = Split(CType(e.Item.FindControl("lblCustSector"), Label).Text,
",")
' don't know what to put here .. as i can't get the control..

End Sub

in display, custsector is in label control. Only after pressing EDIT, we
will display in listbox with its multiple selection selected .. but i still
have no idea how to get those selected value from label to listbox.

Thanks
rgds,
Lie

"Ken Cox [Microsoft MVP]" wrote:
Hey Lie, post the code? You may not being looking in the right cell.
"Lie" <Li*@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.com...
Hi,

Thanks for all replies.
I've tried both ways:
lbx = e.Item.FindControl("listbox1")
and
lbx= e.Item.Cells(8).FindControl("listbox1")

both return nothing ..couldn't find the control. any idea?

Thanks
rgds,
Lie


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Russell Campbell | last post by:
Posting again, since my first attempt never appeared: In the onClick method of a listbox, I am attempting to retrieve the selectedIndex property. The listbox is set up to allow multiple...
2
by: Richard Loupatty | last post by:
I put a datagrid in a panel with an overflow set on auto. I want to show just 5 items in the grid. My question is how to make sure that the selecteditem is always visible in the grid. Because...
0
by: Adis | last post by:
Asp.Net Visual Studio 2003 SQL Server. Hi, I have database in Sqlserver and ListBox (Multiple Selection Mode) in my Visual Studio Webform. I wish obtain various records from...
1
by: Carlo Marchesoni | last post by:
I'm going crazy with this. I just added two Listboxes (lbxSource->multiple selection and lbxDestination -> single selection). Then: a) button "Load": ListItem l0 = new ListItem("01");...
2
by: Dolorous Edd | last post by:
Hi, for a program I'm working on I need to be able to drag multiple files between Windows Explorer and a ListBox, in both directions. Implementing the "drag in" was pretty easy, but I can't find...
3
by: Magnus | last post by:
Im using a set combobox (ComboBox1) to provide a selection of records from a database table. I have a typed dataset (DataSet1) that contains the typed datatable (DataTable1) that the combobox is...
3
by: Alec MacLean | last post by:
Hi, I have a couple of win forms where I am editing values that are stored in a SQL database. I'm using the listbox control to hold the data object each form interacts with. Each object is...
2
by: amtamayo | last post by:
I have a simple webform that has a listbox that I bind to a dataview at designtime. This provides an optional selection for the user so I wanted to have no default value selected. So on the...
1
by: Marisa | last post by:
Hi. I am new to C#, and I am having trouble getting the multiple selection of listbox to work. I have an asp.net web form, and I need two listboxes which are filled with an access table. I have...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.