Skip to content

ErcanOPAK.com

  • ASP.Net WebForms
  • ASP.Net MVC
  • C#
  • SQL
  • MySQL
  • PHP
  • Devexpress
  • Reportviewer
  • About

Tag: null

ASP.Net WebForms / C# / Devexpress

How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid

- 04.08.22 - ErcanOPAK comment on How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid

By design, GridViewDataComboBoxColumn does not render (Blank) and (NonBlank) items if the HeaderFilterMode property is set to CheckedList. However, you can add these items in the HeaderFilterFillItems event handler. Just call the FilterValue.CreateShowBlanksValue and FilterValue.CreateShowNonBlanksValue methods. <dx:ASPxGridView ID=”grid” runat=”server” AutoGenerateColumns=”False” DataSourceID=”dsCategories” KeyFieldName=”CategoryID” OnHeaderFilterFillItems=”grid_HeaderFilterFillItems”> <Columns> <dx:GridViewDataTextColumn FieldName=”CategoryID”> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn FieldName=”Description”> </dx:GridViewDataTextColumn> <dx:GridViewDataComboBoxColumn FieldName=”CategoryNameNull” Caption=”Category Name”> <Settings HeaderFilterMode=”CheckedList” /> <PropertiesComboBox DataSourceID=”dsCategories” ValueField=”CategoryNameNull” TextField=”CategoryNameNull” /> </dx:GridViewDataComboBoxColumn> </Columns> […]

Continue Reading ..
SQL

How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL

- 09.04.21 - ErcanOPAK comment on How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL

If you only want to match N” as an empty string SELECT COLUMN FROM TABLE WHERE DATALENGTH(COLUMN) > 0 If you want to count any string consisting entirely of spaces as empty SELECT COLUMN FROM TABLE WHERE COLUMN <> ” If you want to use DATALENGTH for any string consisting entirely of spaces then you […]

Continue Reading ..
C#

Default Values for Data Types in C#

- 13.08.20 - ErcanOPAK comment on Default Values for Data Types in C#

Table below shows the default value for the different predefined data types. Type Default sbyte, byte, short, ushort, int, uint, long, ulong 0 char ‘\x0000’ float 0.0f double 0.0d decimal 0.0m bool false object null string null As you can see, for the integral value types, the default value is zero. The default value for […]

Continue Reading ..
ASP.Net MVC / ASP.Net WebForms / Devexpress / HTML

How to Solve The ‘Object reference not set to an instance of an object’ error in Batch Edit mode for ASPxGridView

- 01.10.19 | 22.11.19 - ErcanOPAK comment on How to Solve The ‘Object reference not set to an instance of an object’ error in Batch Edit mode for ASPxGridView

The issue occurs in Batch Edit Mode, because in this mode an empty invisible row is created and used for further grid editing. Since the Eval method returns a value type of an object, your attempt to call the ToString() method to the null value can lead to an exception. If you remove this conversion and use <%# […]

Continue Reading ..
ASP.Net WebForms / C#

Add blank item at top of dropdownlist

- 10.06.18 - ErcanOPAK comment on Add blank item at top of dropdownlist

drpList.Items.Insert(0, new ListItem(String.Empty, String.Empty)); drpList.SelectedIndex = 0;

Continue Reading ..
SQL

What does COALESCE do in SQL?

- 02.06.18 | 30.08.20 - ErcanOPAK comment on What does COALESCE do in SQL?

In SQL Server (Transact-SQL), the COALESCE function returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null. SELECT COALESCE(NULL, NULL, ‘ErcanOPAK.com’, NULL, ‘blog.ErcanOPAK.com’); Result: ‘ErcanOPAK.com’ SELECT COALESCE(NULL, ‘ErcanOPAK.com’, ‘blog.ErcanOPAK.com’); Result: ‘ErcanOPAK.com’ SELECT COALESCE(NULL, NULL, 1, 2, 3, NULL, 4); Result: 1

Continue Reading ..
August 2022
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jul    

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (362)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (234)
  • Find numbers with more than two decimal places in SQL (204)
  • Confirm before process with ASPxButton in Devexpress (200)
  • Add Constraint to SQL Table to ensure email contains @ (200)
  • ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn (199)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (197)
  • How to make some specific word(s) Bold or Underline in ReportViewer (191)
  • Devexpress ASPxGridview Column Grouping in Code (184)
  • Tense Changes When Using Reported Speech (171)

Recent Posts

  • How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid
  • How to get ‘n’th row in Sql Query with OFFSET FETCH NEXT and ROW_NUMBER()
  • How to change the style of scrollbar with CSS
  • How to add scroll bar to div in Asp.Net
  • How to solve “Fatal: Not possible to fast-forward, aborting” problem
  • How to add Output Parameter to SqlDataSource
  • How to get stored procedure parameters details in SQL
  • How to add default value for Entity Framework migrations for DateTime and Bool
  • String Interpolation, String Format, String Concat and String Builder in C#
  • How to get triggers create and update date in SQL

Recent Posts

  • How to create the ShowBlanksValue and ShowNonBlanksValue items in Devex Grid
  • How to get ‘n’th row in Sql Query with OFFSET FETCH NEXT and ROW_NUMBER()
  • How to change the style of scrollbar with CSS
  • How to add scroll bar to div in Asp.Net
  • How to solve “Fatal: Not possible to fast-forward, aborting” problem

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (362)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (234)
  • Find numbers with more than two decimal places in SQL (204)
  • Confirm before process with ASPxButton in Devexpress (200)
  • Add Constraint to SQL Table to ensure email contains @ (200)

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter

© 2022 ErcanOPAK.com

Proudly powered by WordPress | Theme: Xblog Plus by wpthemespace.com