פיתוח תוכנה ובניית אתרים תוכנה לעסקים






פיתוח תוכנה ובניית אתרי אינטרנט
תוכנות לעסקים פיתוח תוכנה ובניית אתרים
התחברות לקוחות
כניסת לקוחות

 
 
כניסת לקוחות

  שכחת את הסיסמה?
תוכנות לדוגמא



 
חברת PC GROUP מתמחה במתן פתרונות מיחשוב מתקדמים לעסקים ולפרטיים. פיתוח תוכנות תפורות ומותאמות לעסקים שונים. בניית אתרי תדמית, אתרי מכירות, אתרים פנימיים לניהול עסק ותחזוקת מערכות מחשבים בעסק. אנו מתמסרים ללקוחותינו ומשתדלים בכל כוחנו לספק את המוצר הטוב ביותר במחירים הוגנים.
יצירת קשר מידע על תוכנה 052-663-5054
PC GROUP
  ניתן ליצור קשר בטלפון בין השעות 19:00 - 8:00
מעבר לשעות הנ"ל ניתן ליצור קשר דרך האתר

  טופס יצירת קשר dot   כתובת מייל dot   קבל הצעת מחיר dot
מחשבמידע על תוכנה

How to make a rapid editable gridview
 
This breaks every single design pattern which exists, however sometimes you want to make a rapid editable gridview without writing any code, the solution is simple, just use the designer and use EntityDataSource as your datasource. enable edit and delete buttons and you're done.

The insert auto generated button is worthless because it is NOT implemented, so you'd have to implement the insert the method yourself, no other choice (the guys at Microsoft least until framework 4 just didn't implement the insert method of the autogenerated button!)

If you'd like to sort the gridview, you can just add this piece of code:

  protected void Page_PreRender(object sender, EventArgs e)
        {

          EntityDataSource1.OrderBy = "it.Date";
}

note the "it." prefix of the EntityDataSource1.OrderBy value - the it is the "control variable", which in this context means the gridview's variable, the gridview entitydatasource. It is followed by a column name, in the example above "Date"

that's it.




(If you'd like to take a look how to gridview looks at the aspx so it's something as simple as this:

<asp:GridView ID="GridView1" runat="server" DataSourceID="EntityDataSource1" 
            AutoGenerateColumns="False" DataKeyNames="RecordID" ShowFooter="true"   >
            
            <Columns>
            
                <asp:CommandField ShowEditButton="True"  ShowInsertButton="true" />
                <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" dataformatstring="{0:dd-M-yyyy}" />
                <asp:BoundField DataField="Begin_time" HeaderText="Begin_time" 
                    SortExpression="Begin_time" />

   </Columns>
                                
                       
        </asp:GridView>


 <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=pcgroup1_pcgroupEntities" 
            DefaultContainerName="pcgroup1_pcgroupEntities" EnableDelete="True" 
            EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
            EntitySetName="WorkTimesLogs" EntityTypeFilter="WorkTimesLog" OrderBy="it.Date"  >
        </asp:EntityDataSource>





Post a comment
Your name:

Your comment:


 

מידע על תוכנה
מידע על תוכנה
בית תוכנה לעסקים ולפרטיים