hey all,
when you first load a page with a datagrid item on it, is the first record
always selected by default? if so, is there a way to have it where nothing is
selected by default?
thanks,
rodchar 4 1952
Hi Rodchar,
Actually, nothing can be automatically selected in web datagrid. If you want
to select any item, you have to use EditCommandColu mn/CommandColumn or other
means, such as checkbox in TemplateColumn.
HTH
Elton Wang el********@hotm ail.com
"rodchar" wrote: hey all,
when you first load a page with a datagrid item on it, is the first record always selected by default? if so, is there a way to have it where nothing is selected by default?
thanks, rodchar
Hi,
no, it shouldn't be selected by default. SelectedIndex is -1 unless you
manually set it, or do a selection on the grid.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
"rodchar" <ro*****@discus sions.microsoft .com> wrote in message
news:B6******** *************** ***********@mic rosoft.com... hey all,
when you first load a page with a datagrid item on it, is the first record always selected by default? if so, is there a way to have it where nothing is selected by default?
thanks, rodchar
Hi
you can choose the selected record
dataGrid1.Curre ntRowIndex = 0;
Moti
"rodchar" wrote: hey all,
when you first load a page with a datagrid item on it, is the first record always selected by default? if so, is there a way to have it where nothing is selected by default?
thanks, rodchar
thanks for all the help.
"Moti" wrote: Hi
you can choose the selected record dataGrid1.Curre ntRowIndex = 0;
Moti
"rodchar" wrote:
hey all,
when you first load a page with a datagrid item on it, is the first record always selected by default? if so, is there a way to have it where nothing is selected by default?
thanks, rodchar This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Emerson |
last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C#
Here's my scenario
I click in a cell on a DataGrid. I enter some text. Before changing to another cell in the DataGrid, I move my mouse pointer off the DataGrid and change the selected item in a ListBox or TreeView.
Here's my question
Which should fire first, the DataTable's RowChanged/CellChanged event or...
|
by: DotNetGruven |
last post by:
Anyone have any pointers on how to set the Value and Selected attributes in
a ListItem in a RadioButtonList that is in a DataGrid?
Here's what I have
------DataGrid------
-- BoundColumn 0 --
-- BoundColumn 1 --
-- BoundColumn 2 --
-- TemplateColumn 4 --
-- RadioButtonList --
|
by: Rick |
last post by:
Hello all, I hope all is well with you.
I am having a seriously difficult time with this problem. Allow me to
set
up the problem.
I have a System.Web.UI.Page with the following controls (watch the
layout,
some have child controls):
|
by: Bob Hollness |
last post by:
Hi group. I am a newbie to ASP.NET as you will see from some of the
questions I may ask!
I have a datagrid which I have populated from a database. It works great!
I have added a column, via the Columns dialog box from the properties of the
datagrid, on the left that contains a select button. So now, when you press
the button the whole row is highlighted.
Now, what I want to do is have the user highlight as many rows as they wish...
|
by: karunakar |
last post by:
Hi All,
I want to deselect the row in DATAGRID. in ASP.NET application.
I was alredy selected in datagrid row .I want to change another row in same
datgrid .
Here in my datagrid was selected in Multiple rows. when ever i select the
particular row that time it can be selected .Next time i want to choose
another datagrid row that time in My application first row also
hilighted.(Here Multiple
rows selected) that should not happen
| |
by: zambizzi |
last post by:
....I can't seem to get my hands on a control I'm loading in an editable
datagrid.
Here's my datagrid control:
<asp:datagrid
id="GLRulesGrid"
runat="server"
autogeneratecolumns="False"
oneditcommand="GLRulesGrid_Edit"
|
by: Sue |
last post by:
I'm missing something very simple here, and I need an answer fairly quick if
possible. I'm behind on this project now because of this...
Code examples below question...
I have a datagrid (DG) that I've pared down to the bare essentials. The two
controls involved (MyButton and MyValue) are created in the DG_ItemCreated
sub and added to the two placeholders in the datagrid.
If the button is clicked, the DG_ItemCommand grabs the button's
|
by: Gummy |
last post by:
Hello All,
I have a webpage that has two dropdown listboxes. Based on what is selected
in these dropdown listboxes, it filters a DataGrid . That works fine.
In the DataGrid , when I go to edit a row, I change the textbox (or other
control), click Update, but it doesn't save my data. I then did this...
In Page_Load, I added code to filter the DataGrid only when it was Not
Page.IsPostBack. Then the editing/updating of the DataGrid data...
|
by: Chris |
last post by:
I've been searching all over and think I am close, but keep getting the
error "Index out of range" when trying to reference a nested datagrid when
an OnEditCommand event is raised.
When the OnEditCommand event is raised, I try to do the following:
1. Find the selected datalist item in which the nested datagrid raised the
event. (by calling getDataGridReference and returning the DataList's
selectedIndex)
|
by: cindy |
last post by:
I have a dynamic datagrid. I have custom classes for the controls
public class CreateEditItemTemplateDDL : ITemplate {
DataTable dtBind;
string strddlName;
string strSelectedID;
string strDataValueField;
string strDataTextField;
public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
|
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |