Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
745
Urgent...Problem With Webdatechooser in UltraWebGrid
posted

Hi every body am using infragistics2007.v3

in my solution am using am using two webdatechoosers..one is using in search criteria and another one is using in gridview

 

as shown in figure above.. based on entry date i am getting values in WebGrid.. and in the from Date I am editing the data using another webdate Chooser...but if i click the cell it is not showing whatever Value  in the Grid,it is showing some other value..like shown below

am using the below code    

protected

 

 

void Page_Load(object sender, EventArgs

e)

{

SubscriberId = Session[

 

"strSubscriptionId"

].ToString();

Conn =

 

new SqlConnection

();

ConnAlter =

 

new SqlConnection

();

Conn.ConnectionString = Session[

 

"strDimDbConStr"

].ToString();

ConnAlter.ConnectionString = Session[

 

"strDimDbConStr"

].ToString();

MDDb = Session[

 

"strMDDbName"

].ToString();

SecDb = Session[

 

"strSecDbName"

].ToString();

 

Conn.Open();

getFilter();

 

 

 

if

(!IsPostBack)

{

 

 

this.EntryDate.Value = DateTime.Now.ToString("dd/MM/yyyy"

);

 

 

}

}

protected

 

 

void btnAccept_Click(object sender, EventArgs

e)

{

UltraWebGrid1.DataSource = ds.Tables[0];

UltraWebGrid1.DataBind();

 

 

 

UltraWebGrid1.Columns[6].AllowUpdate = Infragistics.WebUI.UltraWebGrid.

 

AllowUpdate

.Yes;

UltraWebGrid1.Columns[6].DataType =

 

"System.DateTime"

;

UltraWebGrid1.Columns[6].Type = Infragistics.WebUI.UltraWebGrid.

 

ColumnType

.Custom;

UltraWebGrid1.Columns[6].EditorControlID = WebDateChooser1.UniqueID;

WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.

 

DateFormat

.Short;

please suggest me some solution............

  • 745
    posted in reply to Eelko

    Hi thanx for your reply...sorry i given wrong image..now i am given below the right image and details about my need...please go through this and give me some solution

    in my solution am using am using two webdatechoosers..one is using in search criteria and another one is using in gridview

     

    as shown in figure above.. based on Entry date i am getting values in WebGrid.. Based on the EntryDate- 14/09/2010...my FromDate Value is 25/09/2010...i hope u understand upto here,

    Now i want to edit my FromDate Column in the grid using EditorControls.i.e WebDateChooser2...now problem is if i click the EditorControl in the Grid,it is not showing CurrentDate,it is Showing SomeOther Date like Below...

    Now EntryDate-14/09/2010

    FromDate-09/02/2010

     

    now what i need is i want to display the CurrentDate, when i click the EditorControl in the Grid

    am using the below code    

     

     

    void Page_Load(object sender, EventArgs

    e)

    {

     if

     

    (!IsPostBack)

     

     

     

     

    this.WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.DateFormat.Short;

    System.Globalization.

    CultureInfo c = new System.Globalization.CultureInfo("en-US");

    c.DateTimeFormat.DateSeparator =

    "/";

    c.DateTimeFormat.ShortDatePattern =

    "dd/MM/yyyy";

     

    this.WebDateChooser1.CalendarLayout.Culture = c;

     

    this.WebDateChooser2.CalendarLayout.Culture = c;

     

     

     

    );

      

     

     

    void btnAccept_Click(object sender, EventArgs

    e)

    {

    UltraWebGrid1.DataSource = ds.Tables[0];

    UltraWebGrid1.DataBind();

    UltraWebGrid1.Columns[0].Width =

    Unit.Pixel(115);

    UltraWebGrid1.Columns[1].Width =

    Unit.Pixel(115);

    UltraWebGrid1.Columns[2].Width =

    Unit.Pixel(115);

    UltraWebGrid1.Columns[3].Width =

    Unit.Pixel(100);

    UltraWebGrid1.Columns[4].Width =

    Unit.Pixel(100);

    UltraWebGrid1.Columns[5].Width =

    Unit.Pixel(115);

    UltraWebGrid1.Columns[6].Width =

    Unit.Pixel(115);

    UltraWebGrid1.Columns[7].Width =

    Unit.Pixel(115);

     

    if (WebDateChooser1.Visible == false)

    {

    WebDateChooser1.Visible =

    true;

    UltraWebGrid1.Columns[6].AllowUpdate = Infragistics.WebUI.UltraWebGrid.

    AllowUpdate.Yes;

    UltraWebGrid1.Columns[6].DataType =

    "System.DateTime";

    UltraWebGrid1.Columns[6].Type = Infragistics.WebUI.UltraWebGrid.

    ColumnType.Custom;

    UltraWebGrid1.Columns[6].EditorControlID =

    "WebDateChooser1";

    WebDateChooser1.Format = Infragistics.WebUI.WebSchedule.

    DateFormat.Short;

    }

     

    if (dd_StyleCode.Visible == false)

    {

    dd_StyleCode.Visible =

    true;

    UltraWebGrid1.Columns[0].AllowUpdate = Infragistics.WebUI.UltraWebGrid.

    AllowUpdate.Yes;

    UltraWebGrid1.Columns[0].DataType =

    "System.String";

    UltraWebGrid1.Columns[0].Type = Infragistics.WebUI.UltraWebGrid.

    ColumnType.DropDownList;

    UltraWebGrid1.Columns[0].EditorControlID =

    "dd_StyleCode";

    }

    }

  • 115
    posted

    For as far as i see the date in the grid matched the date in de datechooser.
    Your grid displays 09-02-2011
    Your datepicker displays February, 9th 2011

    What's not matching? What other value do you mean. If this still is a problem please be more specific. and also  make sure you parse dates in the correct culture!

    happy coding