hi,
I am using dropdownlist in webgrid.for loading the combo i am using this source code. - Dim vallist As New Infragistics.WebUI.UltraWebGrid.ValueList
-
Dim ds As New DataSet
-
ds = _Utility.runsql("select " + IDField + "," + TextField + " from " + TableName + " where Deleted=0")
-
Dim dt As New DataTable
-
dt.Columns.Add("unit_id")
-
dt.Columns.Add("unit_name")
-
If ds.Tables(0).Rows.Count > 0 Then
-
dt.Rows.Add("", "")
-
End If
-
For i As Integer = 0 To ds.Tables(0).Rows.Count - 1
-
dt.Rows.Add(ds.Tables(0).Rows(i).Item(0).ToString, ds.Tables(0).Rows(i).Item(1).ToString)
-
Next
-
vallist.DataSource = dt
-
vallist.DisplayMember = TextField
-
vallist.DataMember = IDField
-
vallist.ValueMember = IDField
-
vallist.DataBind()
-
Column.Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList
-
Column.ValueList = vallist
After loading the combo ,i am selected the item.If i click the submit button automatically the selected value will be changed as number.In webgrid the number only shows not the selected value.
How to solve this problem.Give solution for this.
Thanks in advance.
7 2574
It is happening in refrech on postback.
Note : Give related topic for your post.
hi,
Thanks .how to refresh.wheathe r call load function in !postback
Hi avanthika,
Welcome to TSDN
Please remember to provide a meaningful Title for any threads started (see the FAQ entry Use a Good Thread Title).
This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.
Please enclose your posted code in [code] tags (See How to Ask a Question).
This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.
Please use [code] tags in future.
- Shashi
hello, - vallist.DataSource = dt
-
vallist.DisplayMember = TextField
-
vallist.DataMember = IDField
-
vallist.ValueMember = IDField
-
vallist.DataBind()
from the above code, is vallist the combobox?
if so then as u can see the display memeber is selected to textField, and valuemember to IDField
If you want the user to view the IDField then assign IDField to the Displaymember
Secondly, The grid you are using is a third party tool..
if there any any queries regarding that, its better to ask their support as the chances of member os TSDN who have used the same will be low.
hi,
how to convert rupees into number format
hi,
how to convert rupees into number format
Isint rupees already a number? (any currency is represented in numbers, i think thats how it works).
Is your currency input as a string?
which means that you want to remove the currency type, and convert the string to a numbner?
please follow up with input example so that we can help you better
Cell show incorrect value when Valuemember assigned as idfield
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Supa Hoopsa |
last post by:
I have a databound combobox within a datagrid. I have set the DisplayMember
and ValueMember.
BUT, how do I capture the Value (SelectedValue) when the user changes the
selection?
|
by: Ann Morris |
last post by:
INTRODUCTION
One of the most powerful aspects of .NET and Windows Forms is data
binding. Data binding is the process of associating user interface
(UI) elements with a data source to generate a visual representation
of data. Two types of data binding are available for Windows Forms:
Simple Data Binding and Complex Data Binding.
Simple data binding allows you to bind one data element to a control.
In many situations you want to display...
|
by: BBFrost |
last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net
2003. At first things were looking ok, now problems are starting to
appear.
So far ...
(1) ComboBox.SelectedValue = db_value;
If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
|
by: charliewest |
last post by:
Using .Net CF, i have created a 2 dimension ArrayList, and "binded" this list
to a ComboBox control using the "DataSource" property. I have set the
DisplaySource and ValueMember properties as well. The control populates well,
both the display values, and selected values.
However, when i try to "set" the SelectedValue or SelectedIndex properties,
nothing happens.... The default blank value in the ComboBox is always
selected. My code is:
...
|
by: jac |
last post by:
Hey,
this.CmbDataSource = SoortKwijtingList.Items; // Arraylist
this.Cmb.DisplayMember = "Omschrijving";
this.Cmb.ValueMember = "Id";
this.Cmb.SelectedIndex = -1;
(short description : I have a grid and an input area with a textfields,
combobox and 3 buttons add, update and delete. add : make a new record with
| |
by: Oz |
last post by:
Hi
Using VS.NET 2003, Windows XP SP1,
We have a page which has been developed using ASP.NET. On it, is a button
which when clicked is supposed to add some data to a table. When the button
is selected, it causes the ServerClick event to be called twice.
Here's the code: You'll see that there are two grids on the page, and that
the function SetupDataGrid populates data to the two grid. There are also
|
by: Jenna Alten |
last post by:
I have a datagrid with a template column that contains a dropdown list.
I currently fill and display the dropdown list on the page load. This is
working correctly. I am NOT using an Edit Column. I am receiving errors
when trying to set the selected value of the dropdown within the
ItemDataBound() subroutine. Below is the code I am using. I hope someone
can tell me if this is possible.
'''HTML'''
<asp:datagrid id="dgAssignments"...
|
by: tfsmag |
last post by:
I have a Grid that I've set up to have two of the fields use
dropdownlists while in edit mode. Now I can bind the data to the
dropdownlists just fine. My problem is that the second dropdown depends
on the first dropdown to pass a parameter to it. If I have a
selectedvalue set to the second drop down, when i select a new value
from the first drop down it gives me this error.
"Databinding methods such as Eval(), XPath(), and Bind() can...
|
by: Shahzad Godil |
last post by:
Hi,
I am using WebCombo outside grid seperately in my FormView and not in grid.
I am just going to replace my existing standard .net web controls with
infragistics input controls
Able to replace all textbox with WebTextEdit with their databind without
any problem. But didn't find any attribute in webcombo where can I give
databinding expression.
|
by: shamirza |
last post by:
· What is view state and use of it?
The current property settings of an ASP.NET page and those of any
ASP.NET server controls contained within the page. ASP.NET can detect
when a form is requested for the first time versus when the form is
posted (sent to the server), which allows you to program accordingly.
· What are user controls and custom controls?
Custom controls:
A control authored by a user or a third-party software vendor that...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |