473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sort the grid

hai friends helpme this is sailaja,

i need to sort the datagrid, with respect to enter data in textbox which was placed out of grid
Mar 10 '08 #1
2 819
Hi,

Are you using Datatable to store the added text? If that so then you can sort the datatable directly and then can bind it to datagrid. Or you can take your data in datatable and sort it and bind it to datagrid.

Thanks
Mahesh


hai friends helpme this is sailaja,

i need to sort the datagrid, with respect to enter data in textbox which was placed out of grid
Mar 10 '08 #2
saran23
28
hai friends helpme this is sailaja,

i need to sort the datagrid, with respect to enter data in textbox which was placed out of grid
Hi Sailaja,

May i know whether ur using datagrid(1.1) or gridview(2.0),
If ur using grid view, then assign the datatable to DataView, use the sort property of dataview to sort the items based on the values, and then use this as a datasource for the grid view.
But Im not sure whether Dataview is there in 1.1 version,
If yes then U can use this.
Here is a sample Code...

Expand|Select|Wrap|Line Numbers
  1.   DataView dv = new DataView(datatable);
  2.         dv.RowFilter = "columnname='" + urValue + "'";
  3.         return dv;
Mar 10 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Steve B. | last post by:
I have a DataGrid on the left and TextBoxes (TB) on the right. The TB's reflect the contents of the grid cells. Sorting of columns (both thru VS and programmatically) work fine except, when the...
1
by: Das | last post by:
hi, I'm using data grid with allow sort to true. So with user clicks the header of the column the data is sorted by the column. With the help of hittest I know that which column was last sorted...
0
by: Marco Soul | last post by:
Hello, I am not quite sure how achieve this scenario: I have a data grid with column headers not showing in the grid, rather they're being displayed in a placeholder above the grid as link...
1
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting,...
0
by: DBLWizard | last post by:
I posted a message on the topic earlier and thought I had it solved but in testing have found problems. I have a Templated GridView control on a webpage bound to an ObjectDataSource. There are 3...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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
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,...

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.