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 1943
Hi Rodchar,
Actually, nothing can be automatically selected in web datagrid. If you want
to select any item, you have to use EditCommandColumn/CommandColumn or other
means, such as checkbox in TemplateColumn.
HTH
Elton Wang el********@hotmail.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*****@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.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.CurrentRowIndex = 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.CurrentRowIndex = 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...
|
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 --...
|
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...
|
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...
|
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...
|
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"...
|
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)...
|
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...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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,...
| |