Welcome Guest Search | Active Topics | Sign In | Register

ASPXToPDF Color in Gridview is not equal to PDF Options
keithlsp
Posted: Tuesday, December 18, 2012 3:29:31 AM
Rank: Member
Groups: Member

Joined: 12/14/2012
Posts: 16


Hi All,
I found that the color in gridview is not same as the PDF, is it any setting I need to configue? many thanks!!!

eo_support
Posted: Tuesday, December 18, 2012 9:23:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Verify your page with Chrome browser first. Different browser can interprets the same HTML/CSS differently. Our rendering is most close to Chrome.

Thanks!
keithlsp
Posted: Tuesday, December 18, 2012 11:31:53 AM
Rank: Member
Groups: Member

Joined: 12/14/2012
Posts: 16
Thanks for reply, I am using chrome
keithlsp
Posted: Tuesday, December 18, 2012 11:53:15 AM
Rank: Member
Groups: Member

Joined: 12/14/2012
Posts: 16


If I set the Row Background color to Yellow in the GridView properties, is can show the color.

When I Try to code the condition make it change color, the color is no change.

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if( e.Row.RowType == DataControlRowType.DataRow)
{
try
{
string Level = ((System.Data.DataRowView)((GridViewRow)e.Row).DataItem).Row.ItemArray[5].ToString().Trim();
if ((Level.Equals("DM")) || (Level.Equals("I")) || (Level.Equals("CD")))
{
e.Row.Cells[3].BackColor = System.Drawing.Color.YellowGreen;
e.Row.Cells[4].BackColor = System.Drawing.Color.Violet;
}
//string strValue = DataBinder.Eval(e.Row.DataIte, "Level").ToString();
string c = "";
}
catch
{
}

}
}
eo_support
Posted: Tuesday, December 18, 2012 11:58:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please try to update to the latest version first. As to the difference between setting color in code or in aspx, that has nothing to do with us. We do not run your server side code. Your application runs your code. We take the output HTML and render it. So as long as a static color works fine, then our converter is working correctly and the problem is in your code.

Thanks
keithlsp
Posted: Tuesday, December 18, 2012 12:07:16 PM
Rank: Member
Groups: Member

Joined: 12/14/2012
Posts: 16
Thanks, I have fixed the problem.

When I use the GridView1_RowCreated event, the pdf grid will have no effect. Then I try to use the GridView1_RowDataBound event, it's work fine!!!!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.