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
Problem With WebDateChooser in UltrawebGrid
posted

Hi  everybody, i am using Infra2007.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.. 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)

{

 

 

 

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)

 

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)

 

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";

 

}

}

{

dd_StyleCode.Visible =

}

 

{

WebDateChooser1.Visible =

 

UltraWebGrid1.DataSource = ds.Tables[0];

UltraWebGrid1.DataBind();

UltraWebGrid1.Columns[0].Width =

 

 

Parents
No Data
Reply Children
No Data