|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: |
<asp:GridView ID="GridViewOwners" runat="server" AutoGenerateColumns="False"
AllowPaging="true" PageSize="2" CssClass="adgridtablestyle2"
OnPageIndexChanging="GridViewOwners_PageIndexChanging" DataKeyNames="DiagramID"
AutoGenerateEditButton="True" OnRowEditing="GridViewOwners_RowEditing"
OnRowCancelingEdit="GridViewOwners_RowCancelingEdit" OnRowUpdating="GridViewOwners_RowUpdating"
OnRowDataBound="bindDropOwners">
<EditRowStyle BackColor="#F7F7F7" />
<AlternatingRowStyle CssClass="adgridaltrowstyle2" />
<HeaderStyle CssClass="adgridheaderstyle2" />
<RowStyle CssClass="adgridrowstyle2" />
<PagerStyle CssClass="pagerStyle" />
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="hdrDiagramID" runat="server" Visible="True" Text="Diagram ID"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblDiagramID" runat="server" Visible="True" Text='<%# Eval("DiagramID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="lblDiagramOwnerHeader" runat="server" Visible="True" Text="Diagram Owner"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblDiagramOwner" runat="server" Visible="True" Text='<%# Eval("Username") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblDiagramOwner" runat="server" Visible="True" Text='<%# Eval("Createdby") %>'></asp:Label>
<asp:DropDownList ID="drpDiagramOwner" runat="server" AutoPostBack="true"
AppendDataBoundItems="true"
onselectedindexchanged="drpDiagramOwner_SelectedIndexChanged">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
//Code Behind C#
private void doOwnerSearch(int ModelID, int Owner)
{
APP1DAL.TypedDs.dsDiagramPermissionAdminTableAdapters.DiagramPermissionAdminTableAdapter ds = new APP1DAL.TypedDs.dsDiagramPermissionAdminTableAdapters.DiagramPermissionAdminTableAdapter();
dtDiagrams = ds.GetDiagramPermission(ModelID, Owner);
this.GridViewOwners.DataSource = dtDiagrams.DefaultView;
this.GridViewOwners.DataBind();
Session["BindView"] = dtDiagrams;
int intStartRecord = (GridViewOwners.PageIndex * GridViewOwners.PageSize) + 1;
int intEndRecord = (GridViewOwners.PageIndex * GridViewOwners.PageSize) + GridViewOwners.Rows.Count;
int intCurrentPage = GridViewOwners.PageIndex + 1;
int intTotalRecords = dtDiagrams.Rows.Count;
if (intTotalRecords > 0)
{
this.lblTotalCountText.Visible = true;
lblTotalCountText.Text = "Displaying records " + intStartRecord.ToString() +
" through " + intEndRecord.ToString() + " of " + intTotalRecords.ToString()
+ " items found (page " + intCurrentPage.ToString() +
" of " + GridViewOwners.PageCount.ToString() + ")!";
}
else
{
this.lblTotalCountText.Visible = true;
this.lblTotalCountText.Text = "No Diagrams Found";
}
}
public void bindDropOwners(object sender, GridViewRowEventArgs e)
{
APP1BLL.UserSecurity.UserSecurity uSec = new APP1BLL.UserSecurity.UserSecurity();
APP1DAL.TypedDs.dsUserTable.UserTableDataTable dtUser =
new APP1DAL.TypedDs.dsUserTable.UserTableDataTable();
try
{
dtUser = uSec.GetAllActiveUsers();
DropDownList drpDiagramOwner = (DropDownList)e.Row.FindControl("drpDiagramOwner");
drpDiagramOwner.DataSource = dtUser;
drpDiagramOwner.DataTextField = dtUser.UsernameColumn.ColumnName;
drpDiagramOwner.DataValueField = dtUser.UserIDColumn.ColumnName;
drpDiagramOwner.DataBind();
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
|
Advertisement
| Hall of Fame |