Click here to Skip to main content
15,894,460 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Image in a DataGrid Pin
Chetan Ranpariya6-May-07 21:59
Chetan Ranpariya6-May-07 21:59 
Questionhow to refresh the data Pin
Kissy163-May-07 23:50
Kissy163-May-07 23:50 
AnswerRe: how to refresh the data Pin
Paddy Boyd3-May-07 23:51
Paddy Boyd3-May-07 23:51 
GeneralRe: how to refresh the data Pin
Kissy164-May-07 0:48
Kissy164-May-07 0:48 
GeneralRe: how to refresh the data Pin
marky7774-May-07 2:52
marky7774-May-07 2:52 
QuestionGridview Questions Pin
kallileo3-May-07 23:40
kallileo3-May-07 23:40 
AnswerRe: Gridview Questions Pin
Spunky Coder4-May-07 0:18
Spunky Coder4-May-07 0:18 
AnswerRe: Gridview Questions Pin
Chetan Ranpariya4-May-07 0:27
Chetan Ranpariya4-May-07 0:27 
HI,

Make autogeneratecolumns property of gridview to false.
and create <asp:BoundField> for each of the column you need to display.
This way your boolean column will display "True" and "False" in the gridview.
Now you can change this to "On" and "Off" by writing code in the "RowDataBound" event of the gridview.
protected void gvDemo_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[2].Text == "True")
{
e.Row.Cells[2].Text = "On";
}
else
{
e.Row.Cells[2].Text = "Off";
}
}
}

set OnRowDataBound = "gvDemo_RowDataBound" in the gridview.

The code for your sencond problem can also be written here only cellindex will be changed.

I hope this will help you.

Thanks and Regards,
Chetan Ranpariya
GeneralRe: Gridview Questions Pin
kallileo4-May-07 1:20
kallileo4-May-07 1:20 
Questiondatalist control and navigation panel Pin
tradakad3-May-07 22:22
tradakad3-May-07 22:22 
AnswerRe: datalist control and navigation panel Pin
Spunky Coder3-May-07 22:30
Spunky Coder3-May-07 22:30 
GeneralRe: datalist control and navigation panel Pin
tradakad3-May-07 22:46
tradakad3-May-07 22:46 
GeneralRe: datalist control and navigation panel Pin
Spunky Coder3-May-07 22:57
Spunky Coder3-May-07 22:57 
GeneralRe: datalist control and navigation panel Pin
tradakad4-May-07 7:43
tradakad4-May-07 7:43 
Questionhow to transfer data between pages with Hyperlink ? Pin
hdv2123-May-07 22:18
hdv2123-May-07 22:18 
AnswerRe: how to transfer data between pages with Hyperlink ? Pin
Chetan Ranpariya3-May-07 22:28
Chetan Ranpariya3-May-07 22:28 
AnswerRe: how to transfer data between pages with Hyperlink ? Pin
Arun.Immanuel3-May-07 22:30
Arun.Immanuel3-May-07 22:30 
GeneralRe: how to transfer data between pages with Hyperlink ? Pin
hdv2124-May-07 0:03
hdv2124-May-07 0:03 
GeneralRe: how to transfer data between pages with Hyperlink ? Pin
Arun.Immanuel4-May-07 1:05
Arun.Immanuel4-May-07 1:05 
Questionusing difference between the two methods in code-behind Pin
surya3kiran3-May-07 22:00
surya3kiran3-May-07 22:00 
AnswerRe: using difference between the two methods in code-behind Pin
Sandeep Akhare3-May-07 22:15
Sandeep Akhare3-May-07 22:15 
Questiondoubt about ds.Tables[0].DefaultView Pin
saravanan053-May-07 21:45
saravanan053-May-07 21:45 
AnswerRe: doubt about ds.Tables[0].DefaultView Pin
Spunky Coder3-May-07 22:40
Spunky Coder3-May-07 22:40 
AnswerRe: doubt about ds.Tables[0].DefaultView Pin
rujuc#3-May-07 22:46
rujuc#3-May-07 22:46 
Questionjavascript visiblity and hidden Pin
yesu prakash3-May-07 21:23
yesu prakash3-May-07 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.