YuiGrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rumana Khan
    New Member
    • Feb 2008
    • 2

    YuiGrid

    Can any one tell how to use YuiGrid of the extender control. I mean how to get the data from the database into that YuiGrid... I have written the code which is working for the gridview of DataControl but not for YuiGrid. Here is the code...

    Code:
        <cc1:YuiGrid Width="411px" Height="300px" ID="YuiGrid1" AutoGenerateColumns="false"
                EnableRowSorting="false" EnablePaging="false" AutoPostBack="true" runat="server" EnableViewState="true" OnSelectedIndexChanged="YuiGrid1_SelectedIndexChanged">
              <Columns>
                 <cc1:ColModel header="Eqp Cls Name" dataIndex="EqpClsName" sortable="true" width="230"  />
                   <cc1:ColModel header="Critical Rank" dataIndex="CrtRnk" sortable="true" width="230"  />
                   <cc1:ColModel header="Description" dataIndex="Description" sortable="true" width="230"  />
                  
                
                </Columns>
            </cc1:YuiGrid>
    
    
    And here is the code behind
    
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Xml.Linq;
    using EAM.BO;
    using EAM.BLL;
    
    public partial class Transactions_Grid : System.Web.UI.Page
    {
    
        protected void Page_Load(object sender, EventArgs e)
        {
            YuiGrid1.SelectedIndexChanged += new ExtExtenders.SelectedRowEventHandler(YuiGrid1_SelectedIndexChanged);
            ScriptManager1.RegisterAsyncPostBackControl(YuiGrid1);
    
            if (!IsPostBack)
            {
                GetAllEqpCls();
    
            }
        }
        protected void YuiGrid1_SelectedIndexChanged(object sender, ExtExtenders.SelectedRowArgs e)
        {
            txtEqpClsName.Text = e.SelectedRow["EqpClsName"].ToString();
            txtCrtRnk.Text = e.SelectedRow["CrtRnk"].ToString();
            txtDescription.Text = e.SelectedRow["Description"].ToString();
        }
        private void GetAllEqpCls()
        {
            long lngEqpID = 0;
            clsEqpClsBLL objEqpClsBLL = new clsEqpClsBLL();
            YuiGrid1.DataSource = objEqpClsBLL.GetAllEqpCls(lngEqpID);
            YuiGrid1.DataBind();
    
        }
    
    }
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      I would have just suggested asking the creater of the thirdparty control for how to use it(i.e. look through THEIR website about it), but I suppose a blanket search on google is about as good.
      That's what like a Yahoo control or something right?

      Comment

      Working...