|
hi,
after fetching the data into the datagridview, how to display the value of a particular field of a selected row, in a textbox.
Nitin Raj Bidkikar
|
|
|
|
|
Hi,
for that you have to start with evetn of SelectedIndex Changing of gridview.
in that u will get selectedindex using e.RowIndex..
Now u can get any cell's value from that.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Iam using datagridview and not gridview, its a windows application, not an asp. there is no selected index available .please help
Nitin Raj Bidkikar
|
|
|
|
|
Hi,
check this.. it will help you.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi Dear.
TextBox1.Text = GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text;
Write this in your GridViewChanging or Some Button Click event will help you....sure...
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
your solution doesnt word, as Iam using datagridview and not gridview, its a windows application, not an asp.
the selectedindex is not provided in datagridview
please help
Nitin Raj Bidkikar
|
|
|
|
|
Hello everybody!!!!
I am Pradhuman.
I have to apply the progressbar along with status of the task to show in C#, for windows appliction.
for example : suppose in a file i have 100 records. while progressing the progressbar it has to show out of 100 record how many has been mapped like this.
can anybody send me the code for the above senario help me out.
regards,
pradhuman
thanx sun rays
here with i tried the follwoing code, but its not working as i want. Only progressbar is showing not the activity ststus....
private void button1_Click(object sender, System.EventArgs e)
{
for(int i=progressBar1.Minimum; i<=progressBar1.Maximum; i++)
{
progressBar1.PerformStep();
}
float fpercent = 0;
int counter = 0;
int file = 120;
do
{
fpercent = (float)counter / (float)file * 100;
updateprogress((int)fpercent);
counter++;
}while (fpercent < 100);
// if (progressBar1.Value == progressBar1.Maximum)
// {
// progressBar1.Value = progressBar1.Minimum;
// }
// progressBar1.PerformStep();
//label1.Text=progressBar1.Value.ToString() ;
}
public void updateprogress(int npercent)
{
progressBar1.Value = npercent;
}
plz help me out
-- modified at 3:38 Tuesday 27th November, 2007
|
|
|
|
|
Hi,
check my articles..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi sun
here is the code which i tried.....
<pre>
private void button1_Click(object sender, System.EventArgs e)
{
for(int i=progressBar1.Minimum; i<=progressBar1.Maximum; i++)
{
progressBar1.PerformStep();
}
float fpercent = 0;
int counter = 0;
int file = 120;
do
{
fpercent = (float)counter / (float)file * 100;
updateprogress((int)fpercent);
counter++;
}while (fpercent < 100);
// if (progressBar1.Value == progressBar1.Maximum)
// {
// progressBar1.Value = progressBar1.Minimum;
// }
// progressBar1.PerformStep();
//label1.Text=progressBar1.Value.ToString() ;
}
public void updateprogress(int npercent)
{
progressBar1.Value = npercent;
}
</pre>
|
|
|
|
|
Hi,
So now whats the problem ?
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi Sun,
The code I sent works fine for a progress bar. I was able to see the progress from start to end. But what I want is to see the number of records or files that has been processed along with the status increment.
Just like the way:
||||||| (24 out of 30 )
||||||||||||| (28 out of 30)
|||||||||||||||||||||(Done).
Like this.
|
|
|
|
|
Hi,
for that you have to put timer and on every second you have to check for that.
hope it will help.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Hi gurus,
I need to disable some items inside a ListView control. As far as I know ListViewItem has no Enabled property or something like it. How can I disable a ListViteItem?
Thanks
Aref
|
|
|
|
|
|
Hi gurus,
I need to disable some items inside a ListView control. As far as I know ListViewItem has no Enabled property or something like it. How can I disable a ListViteItem?
Thanks
Aref
|
|
|
|
|
|
Hi gurus,
I need to disable some items inside a ListView control. As far as I know ListViewItem has no Enabled property or something like it. How can I disable a ListViteItem?
Thanks
Aref
|
|
|
|
|
Hi Dear,
I don't know ListViewItem control in 2005. But if you had you can do Visible true false only in
RowDataBound Events only...... You have to find control by Casting it you can do visible true false;
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
Hi!
What do you mean by "disabling" a LVItem? Should it get a different color? Should the user not be able to select the item? Should doubleclicking it perform differently than it does with other LVItems?
Please specify more clearly.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
It is pretty clear that what Enabled and Disabled mean. As you mentioned , Disable items must look Gray and could not be selected. Also their Click, Doubleclick and other such events must not be triggered.
thanks
Aref
|
|
|
|
|
Since MS didn't include an Enabled property for LVItems, it seems it isn't "pretty clear" what you consider a disabled item to be.
ListViewItems are no controls on their own behalf, just like TreeNodes they are dependent from their containing parent control. Thus, Enabled does not have an inherent meaning by itself for child elements of controls.
You'll have to implement whatever meaning you want "Enabled" to have on your own.
"Their Click, Doubleclick and other such events" doesn't make sense, either - a LVItem doesn't fire these events, its containing ListView does.
So if you want a ListView that can handle additional properties for its Items, you'll have to roll your own (i.e. derive from ListView and catch the appropriate events).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Mav is dead on with his response. In order to do this, you'd have to roll your own ListView and ListViewItem classes to expose this kind of functionality.
If you don't want to do that, you could always just remove the disabled items from the ListView.
You really should read up on Windows GUI design guide. In there, it'll tell you why what you're doing is a bad idea. Something about a "consistant user experience". A ListView control is expected to provide a list of valid and selectable items. Turning off some items is an unexpected behavior for the control, thereby leading to confusion about how the control really works.
|
|
|
|
|
hi friends i need some help from u.. i have 1 gridview and i m populating data from database in pageload.. and i created checkbox in gridview so i want to do is now ..dynamically i want to checkbox ll true in gridview..plz..tell me wht can i do now..
thanks 2 all..
|
|
|
|
|
Hi,
in the gridview's datarowbound event you can seach checkbox from e.row.findcontrol["chkboxName"]
and then you can check if from database value is true then chkBox.Checked = true;
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
hi, sunray..
DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn();
{
column.HeaderText = "Total Filed";
column.Name = "TotalFiled";
column.Width = 66;
column.CellTemplate = new DataGridViewCheckBoxCell();
column.CellTemplate.Style.BackColor = Color.Beige;
this is my code which i m doing here, i m creating checkboxs in source code only ...
in this there is no control like checked after press dot..plzz see it once..
-- modified at 2:12 Tuesday 27th November, 2007
-- modified at 2:13 Tuesday 27th November, 2007
thanks 2 all..
|
|
|
|