TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
priya
NA
32
11.6k
alternate color row...
Jun 13 2015 3:28 AM
this is the logic of color row... in which cursor is present...
public void changecolorrow()
{
mshtmlTable table = null;
mshtmlTableRow row = null;
mshtmlTableCell cell = null;
GetTableElement(out table, out row, out cell);
HtmlElement table1 = getTableHTMLElement();
int index = row.rowIndex;
HtmlElement row1 = table1.GetElementsByTagName("tr")[index];
if (table != null)
{
try
{
using (ColorDialog colorDialog = new ColorDialog())
{
colorDialog.AnyColor = true;
colorDialog.SolidColorOnly = true;
colorDialog.AllowFullOpen = true;
colorDialog.Color = ColorTranslator.FromHtml(row1.GetAttribute("Background-color"));
colorDialog.CustomColors = _customColors;
if (colorDialog.ShowDialog(this.ParentForm) == DialogResult.OK)
{
_customColors = colorDialog.CustomColors;
row.bgColor = ColorTranslator.ToHtml(colorDialog.Color);
}
}
}
catch (Exception ex)
{
throw new HtmlEditorException("Unable to colour the row", "Colour row", ex);
}
}
else
{
throw new HtmlEditorException("Table not currently selected ", "Colour row");
}
}
through this logic i just want to color alternate row..... from the row where cursor is present......
Reply
Answers (
1
)
how to view all items in combobox when focus comes to combo
calculate total rows of datagrid